Synchronising game time between clients? #651
Unanswered
Reiss-Cashmore
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I was wondering if I could get some advice on how I would go about this with Colyseus.
I have multiple game clients in a Room. They connect and get dealt some cards. The clients are competing to have the fastest input on the correct card.
Is there an easy way I can synchronise the clients in Colyseus so that they all have like an internal clock / ticker that is sent from the server. This way I can send the synchronised internal clock time that the user selected their input to the server, delay a little bit to wait for any other clients to respond with their internal clock time. Compare who sent the earliest synchronised internal clock time and choose the winner.
Thus compensating for not-so-great network conditions. Is this even a viable strategy or do I need to rethink?
I realise this might be exploitable but that's a problem for another time. I'm thinking mostly about the happy-path user here.
Also this also seems like an unsolvable problem, because if the server sends: "Set your internal time to 9876543321" but they have a slow connection, they will always be off by however much their ping is. Giving laggier players an earlier time and thus an advantage. Is there any sort of like multi-step handshaking that can be done to overcome the ping problem?
Beta Was this translation helpful? Give feedback.
All reactions