TrickyWidget's Forum Posts

  • First off, thank you! This is an essential function and I could hardly use C2 without it.

    Second, I think I found a bug when working with mirrored or flipped sprites. Moving or scaling them with LiteTween un-does the flip or mirror. Is there any way around this?

    Example attached.

    Thanks!

  • Is it possible to set the origin point of a sprite via code? I have a sprite that flips around relative to its container mates and managing it would be worlds easier if I could just change the origin.

    I did some searching and found this post, but that was some time ago and I thought I'd check in to see if it is possible these days.

    Thanks!

  • Containers only work if the objects are created dynamically.

    Ah, that's unfortunate. But thank you.

    I did find a sort-of work around. If I only place one of the instances in the container on the layout, then everything else will spawn and behave as intended. That doesn't allow a full visual design in the layout, but if I use the largest sprite in the container it makes for a pretty good sense of the final look.

  • Have you tried putting each card sprite + symbol in a different family?

    Thanks for the suggestion. However, in this case there are only two sprite objects in total: a card sprite and a symbol sprite. All instances are of those two objects. As I understand it, families group different objects of the same type, not different instances of the same objects. Containers do group instances of the same objects, but I'm having trouble sorting out exactly how.

  • I have a card sprite and a symbol sprite in a container and pinned together. And I have several instances of these card/symbol pairings on the layout. When I click one, it's set to rotate.

    The trouble is, I can't get the cards and symbols paired up. When I click one card, the symbol on a different card rotates. But when I swap them out so that the symbol that rotated is now over that card and try again, yet another symbol rotates instead. I've tried several times, but how it pairs them together in the containers seems to keep moving around.

    I know I could arrange the sprites in code at startup, but I find that hard to work with. I prefer the visual approach of using the layout.

    How do I determine which instances in a layout are going to get assigned to the same container?

    Thanks!

  • I'm finding that I often want to set the properties of an instance with an expression. And while some actions allow expressions as input, some do not. Some only allow numbers or only offer an either/or for a boolean. I'm finding this hard to work with in many cases.

    For example, I have a collection of instances that I want to loop through and randomly set their flip property. If I could use an expression, it would be as simple as using a "for each" condition connected to a "set flipped" action of "floor(random(2))". But the "set flipped" action only offers a drop-down selector of flipped or not flipped. And to use that, it seems like I would need a much more complex arrangement.

    Is there any way to simply set it with an expression?

    Failing that, is there a simple way to accomplish the above that I'm missing? (The best I've found is to call a function with the IID and use a global variable to store the random and compare to that to set it.)

    Thanks!

  • Our rationale for the way spritesheets are done is explained in this blog post: https://www.scirra.com/blog/87/under-the-hood-spritesheets-in-construct-2

    It's a trade-off between various concerns of PNG color counting and recompression, loading feedback, backwards compatibility, and a few other concerns.

    Ah, thank you! That explains in detail exactly what I was wondering about. And it does make sense.

  • Well how you presented the information has you sound like your not 100% accurate. The JPG/GIF/BMP/PNG is only a storage model. Once the system unpacks the image into RAM it's all the same. So while JPG could reduce the download size. It's not really going to be a big difference unless you need that bleeding edge download. Most people don't need it. However if you need it. Just take the PNG in the export and convert it to JPG.

    I want a smaller download, smaller storage footprint, and a faster loading time, all of which does indeed matter if it's JPG. And it turns out there's a setting to do just that in the sprite editor (Properties, Animations, Edit, Set export image format) without converting it back manually after the export (which would also result in image degradation).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This has been covered more than once. Try search and look for Ashley's responses.

    Already did that. Did some more.

    Found the setting to change a graphic to JPG export.

    Still have no idea about sprite sheet exporting.

  • Hello! I'm a long-time techie and coder, but new to Construct 2.

    When I export a project to HTML5, I notice two issues with how graphics are handled:

    1) The sprite graphics are stored as individual files and not compiled into sprite sheets (except for individual animated sprites). Doesn't this hurt performance, especially for games with large numbers of sprite types?

    2) My JPGs are converted to PNGs. For large background images without transparency, JPG makes more sense than PNG. But C2 is automatically converting them and adding needless megs and loading time to my project. Is there any way to change this?

    Any feedback or suggestions would be appreciated. Thanks!