Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

If I have a series of PNGs that I'd like to use as a single animated texture, would I be able to use them as they are, or would I first need to convert them to a different format, like a single TGA?

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

There are programs helping you in this task. I personally use Zwoptex. Basically you load all your pngs, it arranges them (translating and rotating each sprite) into a bigger image (you decide the size) called texture atlas. You can then export the atlas with a xml file containing the coordinates of each single sprite in the atlas.

share|improve this answer
    
I'd just like to add: check out sprite sheet packer, which is an open source alternative. But yeah using a texture atlas is definitely the way to go, its much more efficient than using separate files for each frame. (bit more info in my answer here: gamedev.stackexchange.com/questions/27200/…) –  Aralox Apr 12 '12 at 8:48
    
ImageMagick is a command line utility that is capable of combining images in this manner. –  stephelton Apr 12 '12 at 18:25
    
TexturePacker is my favorite, but regardless note that Zwoptex and TexturePacker are Mac software, Sprite Sheet Packer is Windows, and ImageMagick is platform agnostic. –  jhocking Apr 12 '12 at 18:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.