Don't always flip()Something bugged me today. Although our game runs at a fast 60fps, it still was using about 60% of CPU on my weak eeepc. For a game mainly only active on events this is pretty bad. To solve this issue I decided to get rid of the display.flip() and use pygames.update() instead only updating parts of the screen that are more commonly used. By doing this our CPU usage was reduced to 2/3rds. More optimization to come.
In case you are not writing a scrolling game: pygame.display.update() might save your framerates.
Comments: (log in to comment)