1 sprite with 50 animations OR 50 sprites with 1 animation ?

0 favourites
  • 6 posts
From the Asset Store
X3 Tile map 50x50 pixel
$1.20 USD
60% off
Three 50 by 50-pixel tile maps for your 2d platformer games
  • Hi ,

    I'm developing tower defense game, and i have many different soldiers with different ability for each . I just want to know is there any difference between that ? about performance or anything else ...

  • I found I needed to do too much extra checking to drill down to get the type of object I wanted to work on plus a noticeable performance hit on collision detection. Encapsulating all my objects no matter how similar they were and using families to group them just worked better overall.

  • If you will make 1 sprite with 50 animations you will get less download size, because construct will place all the assets in the same sprite sheets.

    If you will make 50 sprites with one animation each - you will get 50 sprite sheets - longer download time.

    But making 50 sprites may be better in a manner of structure-simplicity, much easier to put each soldier in his family according to his abilities, so you will code according to families and not per separate animation cases. You may even earn in terms of performance because you will pick more specifically in your conditions.

    If I was you I'd use 50 sprites with one animation each and place them in families (soldiers (all), land, air, fast, giant, regenerating, spawning etc...)

    And later it will be much easier to add new soldiers, you will have to just add the unit in the right families and set some family variables, without touching any code.

    p.s. More over, what if you will want to add more animations to a unit. Right now you have one animation - walking, but you may want to add animations "die" and "attack"... So yeah, use 50 sprites.

  • Thanks for the time you spent . You've told me very useful tips .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Probably the most important reason to use 50 sprites is that Construct can only load entire sprites in to memory. One sprite with 50 animations forces Construct to load all 50 animations in to memory, even if you don't use them all. With 50 sprites, it can load only the ones you're using in to memory, which is a lot more efficient.

    FWIW Construct 3 can spritesheet different sprites together, so the spritesheeting is the same as if you used one sprite.

  • Thanks, the above tips have helped me a lot ...

    I had some doubts too.

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