[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

RE: [pygame] Path finding demo, now with more fugu



> Brian Fisher said:
> It's not a quirk of pygame to run at 100% cpu all the time. 
> The only things special about pygame in this area were that 
> it provides waiting functions that perfer to chew cpu rather 
> than release it (with the intent of getting a high-precision 
> wait function).
> 
> pygame.time.delay does busy loop waiting, and so does 
> pygame.time.Clock.tick_busy_loop. I think 
> pygame.time.Clock.tick used to do busy loop waiting as well, 
> in older pygame versions (not sure when it may have changed).
> 
> If a game uses a function that uses busy loop waiting in 
> order to limit the frame rate then it will take 100% cpu even 
> if it doesn't need to. 

So what is the canonical method of non-busy waiting in Pygame, please?

Brian
"The information contained in this transmission is confidential. It is intended for the named address only. If you are not the named address you may not copy, distribute or take any action in reliance upon this transmission"