Skip to main content
gamedev.net
🔒 Locked

Sync time?

Started by roby65 Jan 21, 2008 at 1:51 PM 2 replies 750+ views
Original Post
roby65
roby65
How can i sync time between 2 pc connected by the internet?? there is the lag that will delay a lot the time..... :(
Wolfdog
Wolfdog
You can't synchronize exactly, there will always be a small margin of error. A better question is why you need the time synchronized, and how accurate you need it to be?

For example Kerberos requires time synchronization and allows ~10 minute margin of error. This is due to timing of tickets.

You may want to look at NTP this can roughly synchronize the clocks, but its best to be sure that you actually need to.
roby65
roby65
i want to do a game with server-side damage, so i need clocks syncronized to know the time when a player shoots :)
Wolfdog
Wolfdog
You have made a very common assumption, take a look at the FAQ question number 25.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.