Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Masked Guardian on Mon 02/03/2009 13:36:44

Title: Size of acsprset.spr is unduly big
Post by: Masked Guardian on Mon 02/03/2009 13:36:44
Hello :)

I converted an .avi file i made to .gif animated file. The .avi was uncompressed, so it was 80MB. The .gif was only 1,90MB! I was so happy when i saw it :)

Then i went to sprite category and i selected "Quick import .gif frames" (setting from preferences a "no-transparecy" choise of course :p ). So i ended up with 61 frames of an 2MB gif.

I compiled the game and watched my .exe's size... 25,5MB!  Without these 60 frames, the size of my .exe was 6-7Mb.

My question: why so large size, when even the quality of the imported gif frames is lower than the quality of the original? :( Or that's how it is supposed to be?

Is this a way to reduce the size? 60 imported gif frames=17MB it's a trouble for me, 'cause i intend to use many animated gifs for special effects and character movements. The option to General Settings "compress sprite file" didn't do anything at all.

I am using the latest version of AGS.

Thanks for your time :)
Title: Re: Size of acsprset.spr is unduly big
Post by: Masked Guardian on Mon 02/03/2009 13:51:15
Ook, i am just another one who didn't make a search before posting this :( At least i figured it out myself :P

I found this topic who explains some things http://www.adventuregamestudio.co.uk/yabb/index.php?topic=16725.0

And with compressing the .exe file it became 3MB! :D

But anyway i would like to hear any other opinion or perhaps some other "tricks".

(The "compress sprite file" option works? ??? )
Title: Re: Size of acsprset.spr is unduly big
Post by: Gilbert on Mon 02/03/2009 14:21:44
Yes. Because if you don't compress the sprites you don't compress them. Raw uncompressed sprites can consume large amount of memory if you have a number of them and they are large in dimension regardless of how 'simple' they look and if they are 'simple' enough you can get a good reduction on the file sizes after compression.

Note how the thread you linked to was made before RLE sprite compression was introduced to the editor. You may have a try and see if it works out good for you.
Title: Re: Size of acsprset.spr is unduly big
Post by: Masked Guardian on Mon 02/03/2009 15:04:25
Hmm it seems to me that threre isn't any difference to the size of the .exe if i select the "compress sprite file" option (this is the RLE sprite compression you mentioned isn't it?), anyway hopefully compressing the .exe itself shall do the trick :)
Title: Re: Size of acsprset.spr is unduly big
Post by: Gilbert on Mon 02/03/2009 15:46:02
It's because RLE compression is very limited when the data aren't 'simple' enough.
So, if your sprites aren't 'simple' (by 'simple' it means with large consecutive areas of solid colours here) enough it wouldn't do much.
Title: Re: Size of acsprset.spr is unduly big
Post by: Masked Guardian on Mon 02/03/2009 20:57:22
Thanks for the info
Title: Re: Size of acsprset.spr is unduly big
Post by: Trent R on Mon 02/03/2009 21:56:11
Maybe not the best way to do it, but perhaps using DynamicSprite.CreateFromFile could help you get around a giant exe. Then you can realease compressed gifs, as well as uncompressed hard-drive intensive gifs.

But it's possible that won't even work.

~Trent
Title: Re: Size of acsprset.spr is unduly big
Post by: Gilbert on Tue 03/03/2009 00:47:46
No, it shouldn't help.

From Dynamic.CreateFromFile() entry of the manual:
Quote
Only BMP and PCX files can be loaded with this command.

So, you can only use BMP files which are usually not compressed (in rare cases indiced BMPs could be RLE compressed, but I doubt whether the engine could use them; it's still RLE afterall) or PCX which are also RLE compressed, i.e. doing this shouldn't make much a difference.

Unless your game is exceptionally large, as AGS games could usually be compressed well there shouldn't be much problems when you distribute them through the net, and since HDD space is relatively cheap today I think it's not a big problem to install a large AGS game for most users (in general AGS games are usually much smaller than those DVD monster games on the market anyway).
Title: Re: Size of acsprset.spr is unduly big
Post by: SSH on Wed 04/03/2009 11:32:51
If you post some of your animated GIFs in the critics lounge, they may be able to suggest ways in which you could reduce the size.
Title: Re: Size of acsprset.spr is unduly big
Post by: Masked Guardian on Thu 05/03/2009 22:43:48
Thanks for the advice :)