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

Re: [pygame] pygame.time.get_ticks() vs. time.clock()



Mike Wyatt wrote:
the values returned by
pygame.time.get_ticks() and the time module's clock() method are not
consistent.

The difference is pretty small, but it is enough to cause a networked
game to go out of sync within a few seconds.

Even if this difference didn't exist, relying on the local
clocks of two machines to keep them in sync for an extended
period of time seems like a bad idea in the first place.
There needs to be some kind of communication to synchronise
them.

--
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing@xxxxxxxxxxxxxxxx	   +--------------------------------------+