Institutional Repository of Vilnius University
Two generals problem in computer games /
Abstract
dc:descriptionThis bachelor’s thesis looks at how the Two Generals Problem works next to communication and synchronization in multiplayer games. The thesis focuses on the fact that in online systems perfect coordination or so called ”common knowledge” is not possible because networks are unreliable and their problems like latency, packet loss, and delays in resending data make it impossible for all players to stay fully in sync all the time. To study and experiment with this, a simple multiplayer first‐person shooter prototype was built in Unity engine and a peer‐to‐peer WebRTC setup with a host‐authoritative model was implemented. To establish the connections and manage/start sessions, a singnaling server was written in python and hosted on a virtual private server.The system also simulated bad network conditions by adding artificial delay and packet loss. In total ‐ three experiments were done. The first one tested how player positions drift apart based on normal, worse or prediction based conditions. It was found, that network problems in‐ crease the position errors, but using movement prediction makes gameplay look smother even though the errors still basically stay the same. The second experiment involved syncing simple evens using a shared counter. It showed, that packet loss can cause permanent mismatches if there was no recovery system. Implementing a eventual consistency synchronisation technique helped prevent growing errors and eventually made all events be delivered and processed properly. Overall, from the results we can see that perfect synchronisation in multiplayer games is im‐ possible, because of the nature of network communication. Although techniques like eventual con‐ sistency, prediction will reduce the impact of network problems and make the player experience smoother. The study concludes that multiplayer systems need to balance smooth gameplay with accuracy, accepting small temporary differences to keep the game responsive and balance different synchronisation techniques based on different data types being shared.
Degree
thesis:*- Grantor dc:publisher
- Institutional Repository of Vilnius University
- Year dc:date
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Rožėnas, Matas,
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- info:eu-repo/semantics/openAccess
- Language dc:language
- eng
Identifiers
dc:identifier.*- Repository record dc:identifier
- https://repository.vu.lt/VU:ELABAETD308338608&prefLang=en_US