{"id":{"repo_id":"vilnius","oai_identifier":"oai:vu.lt:elaba:308338608"},"canonical_url":"https://search.ndltd.org/etd/vilnius/oai:vu.lt:elaba:308338608","repository":{"repo_id":"vilnius","name":"Vilnius University","base_url":"https://epublications.vu.lt/oai"},"display":{"title":"Two generals problem in computer games /","abstract":"This 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&#8208;person shooter prototype was built in Unity engine and a peer&#8208;to&#8208;peer WebRTC setup with a host&#8208;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 &#8208; 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&#8208; 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&#8208; possible, because of the nature of network communication. Although techniques like eventual con&#8208; 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.","abstract_html":"This 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&amp;#8208;person shooter prototype was built in Unity engine and a peer&amp;#8208;to&amp;#8208;peer WebRTC setup with a host&amp;#8208;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 &amp;#8208; 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&amp;#8208; 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&amp;#8208; possible, because of the nature of network communication. Although techniques like eventual con&amp;#8208; 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.","abstract_has_math":false,"creators":["Rožėnas, Matas,"],"institution":"Institutional Repository of Vilnius University","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2026,"date_issued":"2026","date_published":"2026","updated_at":"2026-11-19T10:12:59Z","subjects":["Two Generals Problem, Distributed Systems, Real-Time Systems, Synchronization, Common Knowledge, WebRTC, Peer-to-Peer Architecture, Host-Authoritative Model, Client-Server Architecture, Hybrid Networking Architecture, Latency, Packet Loss, Client-Side Prediction, Eventual Consistency, First-Person Shooter (FPS), Signaling Server, NAT Traversal, Interactive Connectivity Establishment (ICE), STUN Protocol"],"languages":["eng"],"rights":["info:eu-repo/semantics/openAccess"],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://repository.vu.lt/VU:ELABAETD308338608&prefLang=en_US","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://repository.vu.lt/VU:ELABAETD308338608&prefLang=en_US","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","download_url":null,"download_label":null,"download_source":null,"access_status":"open","embargo_until":null,"access_note":null},"source_record":{"url":"https://epublications.vu.lt/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Avu.lt%3Aelaba%3A308338608","prefix":"oai_dc"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Rožėnas, Matas,"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2026"]},{"key":"dc:publisher","label":"Institution","values":["Institutional Repository of Vilnius University"]},{"key":"dc:relation","label":"Dc Relation","values":["https://epublications.vu.lt/object/elaba:308338608/308338608.pdf"]},{"key":"dc:type","label":"Dc Type","values":["info:eu-repo/semantics/bachelorThesis"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Two Generals Problem, Distributed Systems, Real-Time Systems, Synchronization, Common Knowledge, WebRTC, Peer-to-Peer Architecture, Host-Authoritative Model, Client-Server Architecture, Hybrid Networking Architecture, Latency, Packet Loss, Client-Side Prediction, Eventual Consistency, First-Person Shooter (FPS), Signaling Server, NAT Traversal, Interactive Connectivity Establishment (ICE), STUN Protocol"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["info:eu-repo/semantics/openAccess"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://repository.vu.lt/VU:ELABAETD308338608&prefLang=en_US"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["This 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&#8208;person shooter prototype was built in Unity engine and a peer&#8208;to&#8208;peer WebRTC setup with a host&#8208;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 &#8208; 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&#8208; 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&#8208; possible, because of the nature of network communication. Although techniques like eventual con&#8208; 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."]},{"key":"dc:format","label":"Dc Format","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Two generals problem in computer games /","Dviejų generolų problema kompiuteriniuose žaidimuose."]}]}],"canonical_facts":{"dc:creator":["Rožėnas, Matas,"],"dc:date":["2026"],"dc:description":["This 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&#8208;person shooter prototype was built in Unity engine and a peer&#8208;to&#8208;peer WebRTC setup with a host&#8208;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 &#8208; 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&#8208; 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&#8208; possible, because of the nature of network communication. Although techniques like eventual con&#8208; 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."],"dc:format":["application/pdf"],"dc:identifier":["https://repository.vu.lt/VU:ELABAETD308338608&prefLang=en_US"],"dc:language":["eng"],"dc:publisher":["Institutional Repository of Vilnius University"],"dc:relation":["https://epublications.vu.lt/object/elaba:308338608/308338608.pdf"],"dc:rights":["info:eu-repo/semantics/openAccess"],"dc:subject":["Two Generals Problem, Distributed Systems, Real-Time Systems, Synchronization, Common Knowledge, WebRTC, Peer-to-Peer Architecture, Host-Authoritative Model, Client-Server Architecture, Hybrid Networking Architecture, Latency, Packet Loss, Client-Side Prediction, Eventual Consistency, First-Person Shooter (FPS), Signaling Server, NAT Traversal, Interactive Connectivity Establishment (ICE), STUN Protocol"],"dc:title":["Two generals problem in computer games /","Dviejų generolų problema kompiuteriniuose žaidimuose."],"dc:type":["info:eu-repo/semantics/bachelorThesis"]},"updated_at":"2026-11-19T10:12:59Z"}