When animating for the Android platform is it a better practice to create a sprite sheet with multiple states for each sprite on a single picture or should I instead export individual images for each character/state/etc.? Which option gives me a smaller file size for resources and which is easier for the programmer to animate?

2 Answers
2

It depends how many you have and how many of those would be in use at any given time.

I would break it down as follows:

For each "sprite" I would have one sheet, each WxH section is a single frame. If there are only a few states, I'd keep those all in the same image file, and just make a map of

Walking is sprites 0-9

Jumping is 10-15

Crouching is 15-20

If you have many states per sprite, I would consider breaking up each state animation into its own file.

If you only have a few sprites and a few states, it might be best to simply have it all on a single image file, and use the maping I have above, but include it per sprite. This will keep the amount of memory usage to a minimum, since you're targeting android, memory is a premium resource and should be conserved where possible.

One of the biggest speed advantages from using a sprite sheet is that you can render multiple instances of the sprite batched with a single draw call. If you do it with individual images then each character (or whatever) on screen is going to be a different draw call unless they happen to be on the same animation frame.

In general you probably want to atlas as much as possible onto a single sheet.