Graphics compression

Started by Kairus, Wed 28/01/2004 03:19:30

Previous topic - Next topic

Kairus

I thought the fact you could import PCX files meant you could reduce the size of the game, as the PCX are compressed already. But I created a set of very big objects that only used two colors, the size was 17 kb for all of them. Then I imported them into my game and their size was like 125 kb each. Even importing them as 256 colors (which destroyed the images as the colors didn't match the palette) didn't reduce them much.
Do you think in future versions of AGS there will be graphic compression (at least .PCX, which is good enough) support? Or is there already a way to save them compressed into the game?
Thanks,
Kairus
Download Garfield today!

DOWNLOADINFOWEBSITE

Privateer Puddin'

AGS has its own compression, so no matter what format you import, it should have the same results.

Ishmael

Zip the game exe up... it goes to quite a little package. There the images are compressed even more (actually, there are the sprites compressed. AGS compresses only backgrounds when importing)
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Kairus

Yes, I realized the zip thing, but I thought it could be possible that the engine itself compressed the sprites to some decent format (PCX for example, I think the algorythm is free), or perhaps it could import them as 256 colors without messing the colors up and then displaying them in 16 bit... Just a suggestion for later versions of AGS. :)
Download Garfield today!

DOWNLOADINFOWEBSITE

Kweepa

Why bother?
It affects neither your development (unless you spend time trying to second guess the engine :) ), nor the user's download speed.
Still waiting for Purity of the Surf II

Ishmael

how do you shove over 256 colors into 256 col image?

When converting to gif, if the image has less then 256 colors, a custom palette is created for it, and the colors are exactly as they are drawn. If the 256 colors are exceeded, the image will be converted into standard system palette, which messes colors.

And, as already stated, what are you after with this?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

Gilbert

Actually it's a frequently mentioned thing, no matter what the graphics file format you used for import the resultant data are the same, sprites are NOT compressed in an AGS game for speed issue, while bgs in rooms were compressed by some lossless algorithm when saved (which has nothing to do with the original file, and according to CJ should be quite good in compression rate), so sizes and number of sprites are quite critical to file size, if you really need to keep a game small (even when it's not zipped), you may need to have some planning on their usages.

Pumaman

Yep, Gilbert's got it in one.

Room backgrounds are compressed when you import them.

Sprites however are not - this is for performance reasons, since during the game sprites are regularly loaded from disk and it would probably cause a noticable slowdown to have to decompress them as well.

Room backgrounds don't suffer from that problem since they are only loaded once, when the player changes rooms.

SMF spam blocked by CleanTalk