-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desyncs while playing multiplayer #99
Comments
Yes, I experienced that a lot when testing the 10-player multiplayer lobby feature I was working on. |
Yeah, it is surprisingly common even in 4 player games. The solution that I plan on implementing in #98 is to have player clients "vote" on what is the right position and the server then decides based on a majority of players (ties would be decided based on who round it is). WDYT of this solution? A better solution would be to have a copy of the game logic on the server so we could validate turns there, however, this would mean ripping the game logic out of UI (Who thought mixing logic and UI was a good idea in the first place? :D), deciphering it and adding it to the server. |
Majority vote is totally fine for me. Even for 2-player matches it should not lead to inconsistencies if I understood correctly. |
I even experience this on 2 player games. I really don't understand why this is happening. Seems to randomly happen and we didn't find a way to reproduce it. Does somebody has an idea? If I could get a hint where to start searching I could have a look. Or is this a fundamental flaw in the way the communication works and is basically "unfixable" without the proposed voting system (or relocation of positioning code to the server)? |
I think it happens because it is inherently a chaos system and slightest desynchronization or a small change in some float variable yields a very different result. It sadly a black box system too because the code is unreadable. My proposed solution would be server check which would synchronize it between players after each turn. Sadly this requires rewrite of a network system, because current code base is terrible. I am working on the rewrite (and this issue will definitely be fixed once that is finished) but it takes a very long time. ( I have linked PR open for that) |
In the current network scheme, the server doesn't check clients positions so sometimes the client goes out of sync (he sees different ball positions) than the rest of the players.
The text was updated successfully, but these errors were encountered: