Search code examples
c#unity-game-enginecountdowncountdowntimermultiplayer

Unity multiplayer countdown timer


I have a multiplayer game project that I am writing. I have a countdown timer in the game. This counter should work on all clients at the same time. For this, I send time from the server every second. is this a correct process? or should I let each clients calculate their own time?


Solution

  • Depending on the type of game, if you let the clients calculate their own time, that introduces the opportunity for cheating when users spoof the timing on their own machine.

    Here's a pretty thorough article on clock synchronization: https://docs.gamesparks.com/tutorials/real-time-services/clock-synchronization-and-network-programming.html