Advertisement

common format for sprites

Started by March 02, 2009 03:24 AM
2 comments, last by zer0wolf 15 years, 10 months ago
Are there any? Such as one that would be exported by sprite-creation programs etc. Or could it be that GIFs are often used for this?
GIF, PNG, TGA (with RLE encoding) are all common formats because they support transparencies and are lossless formats.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter
Advertisement
Well, as in, suppose you have a PNG file, and there's 30 sprites from an animation packed into it, at different coordinates. And a file accompanies it which describes the animation details, the location of the sprite in the png image, etc.

Is there a format for such file? How do most spriters make sprite anyways? Any program that supports such a format?
I'm not sure what you mean by format? Formatting for coordinates? That is going to vary based on the loader for the game.

If you have a sprite sheet and you're using 64x64 sprites, then you'd some something like: (no specific language here)

right_punch_coordinates = [ ((0,0), (63,63)), ((64,0), (127, 63)), ((128,0), (171, 63)) ]

You just have a predetermined sprite size and layout of the sprites on the spritesheet.
laziness is the foundation of efficiency | www.AdrianWalker.info | Adventures in Game Production | @zer0wolf - Twitter

This topic is closed to new replies.

Advertisement