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

Re: [pygame] 100% CPU FAQ



techtonik wrote:
Hello,

I do not know why this question is not present in FAQ yet, but - why
pygame always eats 100% of CPU time?

The following example shows 100% load even with empty event queue when
pygame.event.get() is blocking.

That would be because event.get() doesn't block. If you want to control your framerate (and therefore CPU usage) use pygame.time.Clock.

--Noah

Attachment: signature.asc
Description: OpenPGP digital signature