[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Frantic memory usage



On Wed, 12 Jul 2006 09:29:21 -0400, "David Mikesell"
<dave_mikesell@xxxxxxxxxxx> said:
> The explosions are definitely a problem.   Roughly 4.6 Mb of memory for
> each, and considering there are two types (regular, ricochet hit) for
> each enemy and one for the starship, as much as 41.4 Mb can be hogged on
> a level just by explosion images (because there are never more than four
> enemies per level, including the boss UFO).

I've cut down the explosion memory usage quite a bit.  They're still
pre-rendered, but now there is only one type of explosion per enemy and
I've cut the length all the way down from 60 frames per explosion to 24.
 They may not look quite as good, but the memory and disk footprint are
a lot less hoggy now.   Download size is 10 MB, down from 17.5 a few
weeks ago.  RAM footprint ranges from 56 - 64 Mb depending on the number
of enemies loaded per level (never more than four, including boss).  
Still large, but way down from a few weeks ago when there was no memory
management.  

http://medievalelks.com

The music still skips/stutters on my laptop sometimes.   I'm looking
into that next.