[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] framerate & non-blocking tick()



Lee Harr wrote:
clock = pygame.time.Clock()
while 1:
   if clock.tock():
       everything.update()
   else:
       cursor.update()
interesting.
at first i couldn't think of a need for nonblocking tick. if you pass tick() no arguments, it will not do any blocking. you could simply use that in a loop and wait for the appropriate amount of time to pass. but that is a little tricky with the Clock.tick() because it is only expecting a single call per frame.


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org