Re: [hatari-devel] Beats of Rage (new Falcon game)

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On lauantai 15 joulukuu 2012, Laurent Sallafranque wrote:
>  > just gave it a try with V1.1, nice game.
> 
> Thanks :)
> 
>  > But maybe you could pack the files ? It takes 5 MB as a zip, but 17
> 
> MB once in the HD :)
> 
> In fact, I have some less available memory under the 4 Meg falcon

In many compression algorithms you only need a small buffer for
decompression.


> and I use intensive cycles to fit in 2 VBLs that I haven't even
> tried to pack anything.

Isn't most of the data loaded linearly before the game?
What kind of files you access randomly?


> And I think every falcon user now owns a Hard drive or a memory stick
> that accepts 17 Megs.

One of the reasons for packing things can be speeding things up.  On ARM
devices running at few hundred MHz, using LZO compression speeded up both
reads and writes to/from flash.

Falcon is much slower, so compressing doesn't speed up things and  isn't
needed by your game, but data reading probably won't be significantly
slower with LZO decompression because HDs are so slow.

More info on LZO:
http://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Oberhumer
http://www.oberhumer.com/opensource/lzo/


When compressing data with LZO -9 compression level, most of the files
compress to less than half of their sizes.

Looking at the attached comparison table, following things would profit
most from compression:
	data/chars/*
	data/players/*
	data/misc/images/*
	data/bgs/*

And stuff in first three directories would give largest savings.


Best way to integrate the compression algorigthm might be to first minimize
the LZO uncompression C-source to just what is needed by the game and then
generating the assembly with GCC or VBCC at high optimization level.


	- Eero

PS. I got the sizes with:
	cp -a beats_ra.ge/ compressed
	cd compressed
	# compress and rename to original names
	for i in $(find -type f|grep -v \.lzo); do mv $i.lzo $i; done
	# get sizes
	find -type f|sort|xargs ls -l|awk '{print $9, $5}' > ../compressed.txt
	cd ../beats_ra.ge/
	find -type f|sort|xargs ls -l|awk '{print $9, $5}' > ../original.txt

Then I just massaged the data a bit with Gnumeric and saved data as Excel
(which is read by all spreadsheet programs, also on Linux...)


> Best regards
> 
> Laurent
> 
> Le 15/12/2012 19:04, Nicolas Pomarède a écrit :
> > On 11/12/2012 23:53, Laurent Sallafranque wrote:
> >> Hi all,
> >> 
> >> I'm happy to give you my first game on Falcon called "Beats of rage"..
> >> (That's why I was less present these months :)
> >> 
> >> You can download it at the following address :
> >> http://dl.free.fr/iR1aPVDZr
> >> Don't hesitate to have a look at the readme.txt file which gives more
> >> informations.
> >> 
> >> I've coded it exclusively under Hatari (but the final release is not
> >> compatible because of the sound), so I've included a version for
> >> hatari without sound nor musics.
> >> I wish we'll manage to fix this one day.
> >> 
> >> Enjoy it
> >> 
> >> Best regards
> >> 
> >> Laurent
> > 
> > Hello
> > 
> > just gave it a try with V1.1, nice game.
> > 
> > But maybe you could pack the files ? It takes 5 MB as a zip, but 17 MB
> > once in the HD :)
> > 
> > Nicolas

Attachment: bor-sizes.xls
Description: MS-Excel spreadsheet



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/