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

Re: [pygame] Reducing memory usage in pygame



Reduce the color depth as much as possible.

Are you just loading images which are on the current level?

To make loading times faster you can put the images into zip files and
load from there.  Compress the zipfiles with no compression.  The pngs
are allready compressed, so they will load faster if no zip
compression is also used.

Making your levels out of repeating tiles saves lots of memory too.


On 7/17/05, Luke Miller <dodgyville@xxxxxxxxx> wrote:
> Hi everyone.
> 
> My pygame game uses individual PNG files for each cell of animation,
> but I'm finding that for complex sequences this is taking up a lot of
> memory (300mb+), as well as taking some time to load.
> 
> Any suggestions?
> 
> Luke
>