Hey guys, whats a good file format for a sprite (by 2^ and squares like 64x64, 32x32, 128x128, for speed and simplicity purposes). Anyway do you know a good file format that has animation and 24-bit RGB pixels/palette?
Posted on 2003-01-02 19:31:20 by x86asm
DDS (DirectDraw Surface).
Posted on 2003-01-02 20:15:12 by comrade
Well using raw data as in BMP or DDS will do for a start.

But usually sprites have a lot of black background in them ...
So you should find a method to compress them (at least eliminate the background).

This will save memory and load time.

You could try and use RLE BMP if you can go by with only 256 colors for each sprite (but they will get expanded in memory to full 32bit ARGB).

JPEG could be another option but loading a lot of JPEGS is very slow ... decoding takes quite some time... with windows OLE interfaces.

You might notice Hostile Encounter started to use our own sprite format .pze ... unfortunately its internal structure is still a secret ;)

GIFs or PNG could also do, but again they will expand to full bitmap in memory... and also decoding could take some time (but not as much as JPEG)

It all depends on how many sprites/animations/phases your game has ...

Do not worry for under 100 bitmaps, start to worry when you get 32 kind of sprites and each has 32 orientations with 32 walking animation/walking phases for each direction :)

My sugestion is to start with BMP and BMP sequences and later on define your own format that will not expand to full size in memory but still allow fast drawing... and i think i have said enough :stupid:

BTW you will need a program to convert BMP/JPEG/Whatever to your own format ... so this is a hssle at early design stages.

PS
-----
Do not think to animation as stored inside sprites (aka GIF style) that was primary used for an interface to the browsers before Java script. You can easy animate sequences of sprites inside your code in much more flexible ways
Posted on 2003-01-05 19:22:18 by BogdanOntanu
Hi there.. New to this board, so first of all thanks to all contributors who have setup the - in my eyes - best forum for questions about Win32 Assembly.

To this thread I would like put up a question. Is there another reference for the DDS format than the badly performed one in the DirectX SDK/MSDN? The Microsoft explaining gives me a creep.

Thanks in advance.

Cheers

Stylus
Posted on 2003-04-26 08:16:40 by stylus