Advertisement

What file format to use?

Started by February 28, 2001 11:30 AM
3 comments, last by MaKe 23 years, 11 months ago
My game''s graphics are in .bmp format so the game is about 30 megs. Hmm.. maybe a little too big, so I''m asking your opinions of what file format is the best for storing the game''s graphics?
There isn''t one definate BEST graphics format. It mostly depends on what you are looking for.

If space is an issue I''d recommend either JPG or PNG formats. JPEG has one of the best compression algorithms, but it''s a lossy compression, meaning image quality will suffer slightly.

PNG offers a very good compression (although not as good as JPEG) which is lossless and, like JPEG, is very popular on many different platforms, meaning you''ll be hard pressed to find a graphics application that doesn''t support it.

Keep in mind, however, that using either of these means you''ll be forced to decompress these images during your game, so that will cause a slowdown. BMP offers no compression so it''s large, but it''s very fast to load.

Basically it all boils down to: which is more important to you, speed or space (combined with image quality)?


- Houdini
- Houdini
Advertisement
you could use a library such as zlib. then you store all of your data in a zip-like file which compresses everything. everything is decompressed at runtime.

HHSDrum@yahoo.com www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
You could compress them with RLE. It''s fast, easy and lossless. It can do magic if your graphic is of the right kind.


"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Check out the TGA format, it supports an alpha channel and RLE compression for all color depths.

BTW, the bmp format only supports RLE compression for 256 color (8 bit) images.

Digital Radiation

This topic is closed to new replies.

Advertisement