123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|585|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> Online game timer

Sun, 20 Sep 2009, 10:39
Mog
Well, i did it by simply logging when the server started by grabbing system time (Millisecs()), then when a client joins, you send them the gametime, then every x seconds, have a heartbeat that makes sure it's in step. Maybe have the client ping out every 10 seconds, and when the server responds, make sure to take the system time from the server and add your ping to it for that heartbeat, since if the servers been on for 2000ms, and it takes 30ms, technically the server is at 2030ms by the time you get the packet back, right?

Seemed to work for me

-=-=-
I am Busy Mongoose - My Website

Dev PC: AMD 8150-FX, 16gb Ram, GeForce GTX 680 2gb

Current Project: Pyroxene