RPG Performance

0 Otto Von Chesterfield · July 27, 2015
Hello,

I'm writing a procedurally generated RPG with PyGame, shown below:
https://raw.githubusercontent.com/MathManiac0/Small-Worlds/master/screenshots/shot01.PNG

The main problem I have is that the game goes ~35fps, and I'm going for 40fps.

The only huge game logic going on is grass growing - which shouldn't take that long. There's a check for grass growing once per ten frames. I'm hoping to add a lot more to this game, but with the performance going on, it doesn't seem like it's much of a possibility.

I profiled and found out that half of the game time is used on gameDisplay.blit, presumably being the cause from blitting all of the tiles on the image.

I have made sure that only the tiles visible are blitted, but the performance is still very low. I don't know what to do to increase the performance of the game!

The code is uploaded on Github.


Thanks,
"Chester".

Post a Reply

Replies

Oldest  Newest  Rating
0 Halcyon Abraham Ramirez · August 18, 2015
sorry if I'm no help. But I just got to say good job man. looks great!
0 Otto Von Chesterfield · August 18, 2015
Thanks!
  • 1

Python

107,281 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator