Many sprite objects or one sprite with many animations?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I'm worried about resource consumption on mobile. My game has a layout that a specific set of sprites is shown. Each sprite has a randomly selected appearance. How should I go with it?

    A) I put sprites on the positions. Each contains many animations. Upon the start of the layout, I randomly select the animation for each one of them.

    B) I put markers on the positions. Upon the start of the layout, I randomly create a sprite object with only 1 animation over the marker.

    Which is more memory efficient for C3?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Both should be the same as the images will be loaded no matter what method you use.

    You can check the tips on memory usage : construct.net/en/make-games/manuals/construct-3/tips-and-guides/memory-usage

    Perhaps you could use the "Load sprite from URL" action of the sprite object to actually load textures on the fly and, this way, load only a single animation frame in already placed/placeholder sprites.

  • Ok. Thank you.

    I realize that if I add a lot of animations and not use it, the memory is still consumed. I will have to optimize my game big time as I use one sprite for foliage and has a lot of animation in it (like sharpLeaf, fatLeaf, etc.) This way every leaf I add, the memory is consumed for all the leaf animations in that sprite. So, the memory is used for the fatleaf even when the entire map doesn't have a fatLeaf in it.

    No doubt my memory consumption is high :(

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)