简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM