Quantcast
Channel: Help with your own apps (new posts)
Viewing all articles
Browse latest Browse all 15

Event handling and threads: Re: Event handling and threads

$
0
0

You have described results! The causes may be different:

  • Use hardware acceleration flag pygame.HWSURFACE | pygame.DOUBLEBUF when creating display surface:
 pygame.display.set_mode((width,height), pygame.HWSURFACE | pygame.DOUBLEBUF) 
  • Another option is that you use wrong flags for display surface, wrong format for images, and wrong group classes for sprites drawing on the screen. For help look into [and [[http://pygametutorials.wikidot.com/book-spriteii]. I will add info about flags for display surfaces to first tutorial soon.
  • Your algorithms (ways you do specific things) may be to slow (but if you are computing e.g. simulation of wot happen 0,000000012 sec. after The Big Bang, it should not be an issue ; ) ). Here don't guess use profiler to test how much time your game spend on event handling, computing and drawing. And the try to repair slowest. And always remember to check it your moves improves speed with profiler.

Viewing all articles
Browse latest Browse all 15

Trending Articles