[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monsterz] Monsterz performance



Hi Sam,

Full disclosure: I wrote Jools, which I see you've kindly linked off the
Monsterz homepage.

I'm always curious about the "competition," so I had a quick look at
Monsterz.  Nice job!  I like the graphical style.  However, it does run a
bit slow on my (admittedly ancient) box, and hogs 100% of the processor.
I scanned the code, and it looks to me like all your screen updates are
*fullscreen*, generated by pygame.screen.flip().  You could improve
performance tremendously by updating only the modified portions of the
screen, using pygame.screen.update() and passing a list of "dirty" rects
as an argument.  This tutorial helped me with performance improvements:
http://pygame.seul.org/docs/tut/newbieguide.html

Apologies if you already knew all this.  Just trying to help out what
looks like a neat project.

Paul


-- 
This is the monsterz mailing-list, see http://sam.zoy.org/projects/monsterz/
Trouble unsubscribing? Please contact <sam@zoy.org>
List archives are at http://sam.zoy.org/projects/monsterz/threads.html