Jump to content
  • entries
    165
  • comments
    199
  • views
    85,511

World clocks now in sync


Flexman

1,268 views

 Share

The game world clock is now synced across network clients, time advance and day-night cycles locked. Accuracy is down to round-trip packet times plus a few milliseconds. More than enough to keep entity spawn times and waypoint navigation in close sync.

 

I'm as yet unsure how often to send clock updates, currently it's every half-second which is quite aggressive, it's easy enough to tweak. Clocks run on client and frame-rate independent so they don't need to be updated often. They just need the occasional time sync from the host or when the host is changing the time-of-day.

 

Chat channels work well, need to add the player name to the prefix. We have a player profile set in the game config but this carries no player name or any other data as yet.

 

Almost ready to test that NAT punch-through.4946580266235927217-3419366811331269227?l=combathelo.blogspot.com

 

Source

 Share

2 Comments


Recommended Comments

Once per hour time-sync is more than enough, even once-per month would do fine, if your PC clock is not deviating more than few secs per month. Once per game start should be done anyway, and that alone might be sufficient too.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...