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

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


Hello Eero,

Sunday, December 16, 2012, 12:04:40 PM, you wrote:

> 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.

Don't oversimplify things. Compression is (IMHO) a design decision not
to  be taken lightly. For example, what speed is the depacking routine
running at? Does it depack in place or does it need an extra buffer to
store  the  unpacked  data and then copy it in place? What impact does
that  have on speed? Is that an acceptable wait for the player? And so
on and so forth.

When  I decided to port Downfall from the Jaguar to the Falcon I had a
few  goals in mind, including close to zero wait time for the player -
since it's a game you want to restart right after you lose because you
want  to  have  "just  another  go".  Init times mattered as well, and
because of that, all the backgrounds are loaded unpacked directly from
disk to the screen buffers. If I opted to have compression to the 1.83
or  8.78mb  background files (for 4mb and 14mb machines respectively),
it  would  have  added  a  delay I deemed unacceptable. That's why the
unpacked zip with the 14mb backgrounds is close to 180mb.

But the thing is, you know how many complaints I had about that?

0 (zero).

So,  in  your  opinion,  would  adding an extra layer of decompression
and lots more development time (sorting out the unpacking routine etc,
let  alone  deciding one first) inside the game just because it's cool
have any specific impact?

When   we're   doing   stuff  for the Jaguar, memory and storage space
really  precious (2mb of RAM for single load games, or an extra 4mb if
making  a  cart version). And even so, we're using the packer with the
fastest  observed  unpacking  time,  Ray's  lz77. We tried packing our
first game with Pack-Ice, which resulted the main game requiring about
15 seconds to unpack and of course raised some criticism.

So,  I'm  all up for Laurent NOT adding compression to his game at all
when  he  could  be  spending time fixing/adding more important things
(like for example a rotozooming intro ;))

>> 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




-- 
Best regards,
 George                            mailto:ggn@xxxxxx




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