Decreasing file size!

Started by ramon82, Wed 07/07/2004 07:04:45

Previous topic - Next topic

ramon82

Hi all,

Can you give some tips on how I can keep my game as small as possible in size? I mean image format (PCX, BMP), palette, res etc..

Thanks for your feedback
Live today and forget tomorrow

Rui 'Trovatore' Pires

I believe the following sentences will give you the lowest sive -

256 colors
320x240
PCX images

I think there's nothing other than the length of the game that interferes with the file size.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Barbarian

And any music or sound files you use, try to have in a format uses the least size, or you can perhaps convert some music / sound files over to a "lower quality" settings which generally reduces file-size, but, then again, you're also reducing sound quality too.
so you can play around and get a balance of what you think is best.

You could also make a version without any music or sounds (arrrgh, what?Ã,  :o no music or sounds? hehehe.).Ã, 

You can also try compressing it different formats too and see what results you get. Like for example, when it comes time it's ready for release and downloading, I think RAR format compression sometimes uses less size than a ZIP file compressions. Though, ZIP seems to be one of the more popular formats when it comes to compressing files.Ã,  Ã, Oh well, just a few random thoughts.Ã,  ;)
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

Gilbert

Using PCX files won't decrease the size of your game, no matter which graphics format you used to store your original graphics files, they're all converted to the same internal formats in an AGS game. Note that room backgrounds will be compressed with some lossless algorithm and sprites are never compressed, so be carefully if you need many large sprites.
Either way, you should ZIP your games before distributing, and this should make some good save on spaces in most cases already.

ramon82

My game is made up so far of PNG sprites which do not exceed 3kb each for the character and a room of the same format which is 20kb large with a 320x200 res and still the game is like 2.3mb compiled already!!

how can i force ags to lower the size of the compiled game? as i said res is 320x200 16bit
Live today and forget tomorrow

Gilbert

If you had already ticked the "Compress sprite file" option, there isn't any other way (unless you reduce the amount and complexity of graphics, etc.).

Because of performance consideration. the sprites are currently compressed with a simple RLE scheme, which can help some, but won't compress well (compared to the tighter scheme used by room backgrounds) if you have more "complicated looking" sprites.

It wouldn't matter much though, as most probably the game will be reduced to a reasonably small size after ZIPPING for distribution.

Fee

Im at the 120 meg mark at the moment for the exe alone, so i tried packing it, but then the game doesnt run for some stupid reason.

Gilbert

Did you mean the game didn't run when it's ZIPPED?
That's normal, you only compress the games for distribution (upload to internet for downloading, etc.). The games MUST be extracted for playing.

SSH

You can't run the game out of a zip file without unzipping it first: you can't use Windows XP's "virtual folder" thingy
12

Hudders

Quote from: SSH on Thu 31/05/2007 09:22:14
You can't run the game out of a zip file without unzipping it first: you can't use Windows XP's "virtual folder" thingy
Are you sure?

I'm convinced I've done that on a number of occasions.  ???

Gilbert

That may work, but probably not within those WinAip, WinRar, etc.

Anyway, that "virtual ZIPed folder" thingie in XP should be avoided whenever possible, it's pure crap.

Fee

No, i actually tried to Pack the exe with UPX and Npack. Basically they compress the exe to a new exe that when you run it, extracts the Packed exe to RAM and runs it.

Gilbert

Why did you want to do that anyway?
If you compile the game to one single executable, the game data (sprite, compiled scripts, rooms, etc.) are appended to the engine file acwin.exe. If you use UPX/NPACK to compress the whole thingie, it may cause problem when it need to decompress "on the fly" the data part to access them in game, especially when the game is large.

Worst of all, the engine executable itself was already packed with UPX, we can't guarantee any odd behaviour will happen (if it executes at all) if you compress it once more.

Anyway, for large games, using the split resource options is preferred to compiling into a single executables since some ppl experienced disk loading performance issues in the past. In this case, UPX/NPACK won't help much on the file sizes (even if it works), so there's little point in doing so.

ramon82

OK. Now assuming I want to start a new game, how can I keep the exe size as small as possible?

format of sprites?
pref res?
pref color dept?
any AGS settings to tick?

Thanks  ;)
Live today and forget tomorrow

GarageGothic

Import format of sprites makes no difference as AGS stores them in its own format anyway. The only thing that matters when it comes to sprites and backgrounds is size, complexity and number of colors.

The other settings are quite obvious. Just go for the lowest possible. 320x200 at 256 colors and use as few of these colors as possible in each sprite/background. Tick the "compress sprites" setting if a small game .exe is important to you. It won't change the rar/zip'ed distribution size much.

Radiant

Quote from: SSH on Thu 31/05/2007 09:22:14
You can't run the game out of a zip file without unzipping it first
Works fine for me, actually, if you find the basic setup acceptable (since I think you can't use setup files this way)

To reduce game size, use MIDI files for music rather than MPG/OGG. Also, stick to a 256-color game, 320x200 resolution, use graphics with many mono-color areas (since this improves the RLE compression that iirc is used for rooms), use the "compress sprite file" flag, and keep the room count low. Not all of these are feasible ^^

META is surprisingly small despite 800x600 resolution, because most of it runs in 16 colors.

SinSin

#16
Hey hey

    Why does size matter these days?? broadband should only take a few minutes even to download 40 mb & most initial games are about 1 mb. I really wouldnt worry too much about the file size (unless you have managed to fill your hard drive with random stuff). In a phsycological sense tho aim for about 20 mb people are usually ok with waiting for files upto that size anymore and people kinda think "thats gonna take ages "
use yer bonce...

Make a game you are comfortable with and wait 2-3 weeks
Look at it again if it needs work, work at it
Zip the compiled folders up
Slap it on the net
Badda bing
Currently working on a project!

Fee

Why? the Exe is 120 meg. Games getting a little big for somthing so crap and since the packer usually makes out Helbreath exe 1/3 the size and still useable, i hoped to do the same with the AGS exe.

Tho as it is, the game runs horribly slow on older PCs. I ran it on my mothers 1ghz machine and there was a 5 - 10 sec wait between rooms, i click to walk somewhere (especiall in the larger "maze" rooms) and it spends upto 30 sec calculating the path to get there lol.. Packing would be detrimental to old PCs so im not going to bother.

Gilbert

Quote from: Radiant on Sat 02/06/2007 19:43:22
To reduce game size, use MIDI files for music rather than MPG/OGG. Also, stick to a 256-color game, 320x200 resolution, use graphics with many mono-color areas (since this improves the RLE compression that iirc is used for rooms), use the "compress sprite file" flag, and keep the room count low. Not all of these are feasible ^^

Just to clarify, room backgrounds do not use RLE, according to CJ it's a better scheme similar to ZIP (Huffman or LZ* etc.), the recent addition of sprite compression uses RLE though.

Pumaman

Quote from: Fee on Sun 03/06/2007 03:47:48
Tho as it is, the game runs horribly slow on older PCs. I ran it on my mothers 1ghz machine and there was a 5 - 10 sec wait between rooms, i click to walk somewhere (especiall in the larger "maze" rooms) and it spends upto 30 sec calculating the path to get there lol..

I'm not sure what your game does but it really shouldn't be that slow on a 1 Ghz PC, unless you've got 800x600 with loads of full-screen-sized objects and overlays.

SMF spam blocked by CleanTalk