In cases where players need to send out their times for game state sync, can everyone send out their default timestamp implementation or should something like NTP be used? http://en.wikipedia.org/wiki/Network_Time_Protocol

  • \$\begingroup\$ Depends. How exact does the time need to be? \$\endgroup\$ – Evorlor Apr 14 '15 at 23:17
  • \$\begingroup\$ For an FPS, as an example, I assume to within a few ms would be good. \$\endgroup\$ – Maksim Kneller Apr 14 '15 at 23:29

Try Event Driven (No timer needed except for scheduled events):

Client side. when client moves or does something. It sents request to server to update itself what's happening.

Server Side. Server updates client if any changes occur on his chat room or when something happens on map where players Range of sight needs to be affected, etc.

If you still insist on timer. Use a singular server time. Players just sync server time for it's own when game starts. Then runs it's own timer. It then syncs only when it communicates again to the server when it needs to.

If your game is not server dependent (or not at network at all), example chess with one of the player (or stand alone player) Use your system time as basis for your timer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.