Tile map vs atlas animation

Hello,

I am building a Facebook Instant game, which means saving disk space is important for me. I was wondering, which is more efficient when creating animations: multiple image files put together in an atlas or single sprite sheet made work in a tile map?

Thanks!

Both are efficient. There are reasons to use either of them but atlases have some advantages as they can have multiple texture sizes possible (keeping many images in a single atlas is important to reduce draw calls) and allow you to trim the sprites to reduce overdraw.

1 Like

Thank you!

So performance-wise there probably is not much of a different if I created a single atlas for a character and its animations or a single tile map with all of the character’s animation?

What do you mean exactly by trimming the sprites?

Yes, even with the benefits of atlases you’re unlikely to see meaningful performance differences when using either over the other.

When you select a sprite in an atlas you can select trimming modes. This adds vertices but lowers overdraw.

Most of the time overdraw matters in very complicated games with lots of things being drawn on top of each other. Probably most 2d games will never reach this point.

3 Likes

Aah, okay, makes sense. So instead of a rectangle that fits the whole sprite but has “empty” area on it, it’s a shape matched to the sprite itself.

Thank you!

1 Like