Sprite sheets or strips?

Monkey Forums/Monkey Programming/Sprite sheets or strips?

AdamRedwoods(Posted 2011) [#1]
Just curious, what is the better method or best practice for loading animated sprites-- sheet or strip? Monkey seems to load in by strip built-in, but sheets you would need to implement yourself using GrabImage(). Correct?

Then my other question is would sprite sheets be preferred because it takes less texture memory than strips because of the powers of two? Example: a 9 frame image strip for 100 x 100 pixel images is 900 pixels wide resulting in a 1024 pixel power of two texture, whereas a sheet could be packed 3x3 images resulting in 300 pixels wide or 512 pixels power of two texture.

Or do modern devices take care of unused space properly and either is acceptable?


Volker(Posted 2011) [#2]

..but sheets you would need to implement yourself using GrabImage()


Diddy contains a GameImage Class with animation support you could use.

Using strips will limit the length of the animation. 4096 max. size of
image / 256 will give you only 16 frames; 32 when using 128x128.
Short: I use sheets.


ErikT(Posted 2011) [#3]
I stick with sprite sheets too. Strips waste a lot of space and memory unless all your frames are the same size.

Monkey seems to load in by strip built-in, but sheets you would need to implement yourself using GrabImage(). Correct?

Yeah, until Monkey's DrawImageRect() supports drawing flipped images then GrabImage() seems to be the best solution.