Sprite compression makes the game compiler FASTER?

Started by LeChuck, Sun 20/05/2007 06:24:01

Previous topic - Next topic

LeChuck

I've got this game that's grown to 170 megs without sprite compression turned on. This, of course, took a long time compiling. Depending on whether I ran photoshop or bittorrent, with only 512 megs of ram compiling often took 1-3 minutes. Then I tried turning ON sprite compression, just to see how much space I could save. I expected it to take at least twice as long as it used to. Guess what... it took about 20 seconds! And it still does, even after adding new sprites.

How the heck does this work?

Edit: I just gotta say, this discovery is really speeding up the game development. Is it on by default? If it is, I've probably turned it off a really long time ago to save time compiling. Running version 2.71.631 btw.

Gilbert

That's because sprite compression uses a really simple RLE scheme, which could reduce file sizes well for simple graphics. Compared to disk accesses, time needed for compressing/decompressing RLE data are really speedy and ignorable (even with slow PCs).
When the editor compile the game it has to copy game data into a file, so the larger your game the more disk accesses, thus the more time needed in general. If say the sprites of your games are simple enough and can benefit from sprite compression to reduce the game's size a lot, the disk accesses would be decreased in compile time, thus faster.

And yes, unless you run into some problems, there's no reason not to turn this option on now.

SMF spam blocked by CleanTalk