I'm writing a procedurally generated RPG with PyGame, shown below:
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.
Post a Reply
|Oldest Newest Rating|
This section is all about snakes! Just kidding.
|Bucky Roberts Administrator|