Game Development Community

What's more efficient? Smaller Spritesheets or Less Spritesheets?

by Joe Alanis · in iTorque 2D · 11/19/2009 (8:13 pm) · 8 replies

It's been puzzling us for a long time, having several animations for a character, we wonder if it is better to have several small spritesheets containing its different animations, maybe its better to save space (I.e. when the character ducks or is in a lower positions, pixels are wasted in the upper part of each sprite).

Or having one Big Spritesheet with all the animations for a given character...

Any thoughts?

About the author

Director of the Animation and Digital Arts Bachelor @ ITESM Laguna Campus Twitter: @joealanis


#1
11/19/2009 (9:51 pm)
The most optimal thing is a balanced use of the stuff because larger textures can be as performance killing as too many texture switches during a frame.
#2
11/20/2009 (4:43 am)
Well, if you have over 9000 larger textures yes. 1 texture sprite sheet (1042x1024) is far better. The "wasted pixels" are a normal side effect of game development in 2D - and its one of the most annoying things for me as well but there is one simple solution - live with it :D

Packing common items and characters into less textures is definitely far more desirable than many textures. For performance and memory usage reasons (coupled with loading times of 1 texture off disk vs multiple file accesses). Speaking from experience - performance with many images VS performance with 2 large images is substantial.

Try to use packed images as much as possible (i have a really neat tool in the next release for that, if you need it sooner shout).
#3
11/20/2009 (8:42 am)
I agree with Sven. I've found that making good use of KEY imagemaps can increase performance and decrease load-times dramatically. Take a look at all your images that are loaded at once, and how many of those you can squeeze into a single KEY imagemap. I've been helping a number of clients do optimizations in their games, and I've been able to do things such as take literally 20 separate images, and combine them into a single KEY imagemap. Not only did this increase performance and decrease load times for that client, but it also dealt with some of their crashes.
#4
11/20/2009 (10:29 am)
Dave, i edited my post :>

Als, AVOID LINKED IMAGE MAPS.
#5
11/20/2009 (10:39 am)
Cool, thanks for your input!

And what does your new tool do, Sven? I want to check it out!

And i just want to be clear if I understood. By "Key" image maps you mean important Sprites or is "Key" a type of object in T2D? Hahaha

:)
#6
11/20/2009 (10:53 am)
Key sprites: They are based off colour keys; the key is the background colour. There is a better description somewhere here on the forums and/or TDN, but basically the sprites can be variable sizes because the key colour is subtracted, leaving only the shape where that background colour ends.

I personally use ImageMagick's various tools to slice & glue sprites together, but I'm also interested in Sven's tool if it does anything more easily. If it's not GUI-based, well, there's a tool I could look into making ;)

(It can also handle adding a background colour or turning a sheet FROM key to transparent background)

If you are starting off with 3D models, SpriteWorks 2 looks like the tool for the job. Just hoping for the Mac version to be ready soon :)
#7
11/20/2009 (12:31 pm)
Oh now I see... Cool.

Our art in our current projects is 2D, and we're using Graphics Gale for creating the spritesheets... very straightforward.. Haven't checked out any other sprite creation tool.

Let me know about that tool, Sven, ;)

J
#8
11/20/2009 (5:16 pm)
Ronny, you are correct in fact. In my post i had confused LINKED image maps and KEY image maps. Apologies on that one, i am editing that post to avoid confusion.

@ Joe : Look for a new thread in a couple minutes :)