Which method is better to use ?
- one single sprite with different animations and all the behaviors (activated only the needed ones)
- multiple sprites (each with only one animation) and the behaviors needed
In other words:Sprite 1 (animation 1 out of 4 // 1 behavior activated // 3 behaviors deactivated)
Sprite 1 (animation 2 out of 4 // 2 behaviors activated // 2 behaviors deactivated)
Sprite 1 (animation 3 out of 4 // 3 behaviors activated // 1 behavior deactivated)
Sprite 1 (animation 4 out of 4 // 4 behaviors activated // 0 behaviors deactivated)
VSSprite 1 (1 animation // 1 behavior (activated))
Sprite 2 (1 animation // 2 behaviors (all activated))
Sprite 3 (1 animation // 3 behaviors (all activated))
Sprite 4 (1 animation // 4 behaviors (all activated))
The game will be for mobiles, so I want to squeeze all the performance I can get (and yeah, I know about https://www.scirra.com/blog/83/optimisa ... -your-time
I'm asking this because I noticed that the animations of a single object are exported in one image, while animations for different objects are exported in multiple image files.
Also, I have another 2 small questions:
Creating and destroying objects (one at a time) can create junk memory or some slowness ?
Creating the level object by object at the start of the layout
from a .json
file will have an impact over the performance ?