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

[pygame] PyGame performance tips



Hello,

I am testing pygame for making a game with isometric tiles,
and would appreciate any advice about how to improve the performance of
the rendering.

I currently get about 18 FPS with this very simple map, thus making a more
complex map will result in horrible performance. (I would like to use
alpha blending, animations, and draw several more layers of tiles.)

The prototype can be downloaded here:
http://www.stud.ntnu.no/~andrearo/OpenRTS.zip
Run OpenRTS.py, and a isometric map will be displayed. Right click and
move the mouse to "navigate" the map. Close the window, and the FPS rating
will be printed in the Python Shell.

I have tried to use the Sprite class instead of the Surface class, but
that did not improve performance.

Andreas Røsdal