Saturday, 29 January 2011

Hmm compressing can be depressing...

Well I have been looking this week at compression and I now know its a bloody tricky business, RLE does shave some off of but not much (110Kb) so I am looking at CIC (Colour Index Correction) to compress the file if all goes well I should be able to shave off another 40-50% once I get all this sorted we should be nearer to completing the GDI image format. I want to get it down to at least past TGA format (336Kb instead of PNG's 174Kb) once we got that down then I will start using GDI as the internal format for GD games. Ideally I want it as near to PNG as I can if I can do that then the more off the better :).

We have cracked it, to cut a long story short I didnt use RLE instead I have created our own format that doesnt use any proprietary systems or compression methods. Our GDI (Graveyard Dogs Image) format is a little bigger than TGA at the moment, this isnt to bad seeing as the data system is in its infancy with some more tweaks and 'adjustments' we could get it smaller than that by upto another 25 to 50% making the size more nearer the jpeg format or gif file format.

'Why the hell create your own format' you may cry, the answer is a simple one. Having our own format allows us to make our own packers, compressors and other things. Also with the data loaded using our own loaders I can do anything imaginable with the textures. Imagine I could pack several textures into the one texture by simply adjusting certain values so instead of sending eight textures to the graphics card I send one that has been packed in Tombstone to it making it seven times more efficient than current methods as the packing method can be done anytime and a single change of one texture will change EVERY entity that uses that texture reference in the Tombstone world.

Ok after a little more tweaking I have shrunk the data segment EVEN MORE we are down from 256Kb to 131Kb now its 82Kb, taking into account PNG is coming in at 33Kb which is compressed with ZLib so what I want to do now is get it even more compressed and speed up the compression system.

More soon...

No comments:

Post a Comment

blogdigger