WebGL builds are not supported on mobile devices.

Multiplayer Prototype

Home

Multiplayer Prototype Screenshot

Problems

The industry Standard client server networking architecture ties the complexity of the game design to the complexity of the networking design. Large game worlds need custom synchronisation code to send the game state from server to client. Unique code needs to be written for both client and server to handle different user interactions. A client server model also requires complex, costly low latency servers spread out across the world that can handle varying loads which need to be maintained, monitored and kept in sync. This prototype solves these issues with exceptionally low overheads while being hack proof and delivering best in class latency.

Goals

The goal of this prototype was to develop a new approach to networking that allows rapid creation of multiplayer games, reduces iteration time on new features, reduces setup overheads and has minimal maintenance costs all while being secure from hackers and networking errors. To achieve this goal game code is isolated from networking code, allowing the addition of new features without fear of networking complications or complex state synchronisation logic. The only constraints on game design are the computational cost of each game tick and the time it takes to synchronise the initial game state. To reduce code duplication, overheads and maintenance the game architecture is peer to peer requiring only a low cost matchmaking server to connect peers; all other game logic is handled client side. With the network architecture demonstrated in this project a game team with minimal multiplayer networking knowledge can build upon this networking library and create a new multiplayer game that is playable internationally with optimal lag in a matter of weeks not months.

Details

This prototype uses a "no server" peer to peer networking architecture that maintains integrity with up to 49% of the players executing a coordinated hacking attempt (resistant to higher numbers of hackers if they are not working together). Matchmaking is done by a web API hosted on firebase. All other communication is peer to peer via WebRTC and does not require a web server. Game state is synchronised using determinism and synchronised user inputs similar to Starcraft 1 or Age of Empires (search for 100 Archers on a 256k modem for more details). To make sure all peers work off the same input sequence the app uses a cryptocurrency style block chain, with a proof of stake style voting system, to resolve branching. The architecture has no master peer, all peers are equal. When a peer leaves there is no need to transfer state or perform any other action that would degrade the game performance for the remaining peers.

State

This prototype is not complete, has many errors and lacks key features but as a pathfinder the lessons learnt from it have been invaluable and it has demonstrated the promise of this networking architecture.