In the previous chapter, we saw how the WebSocket API could be used with a Node.js server to implement a simple client–server networking architecture. We used this to build a simple game lobby, so two players can now join a game room on a server and start a multiplayer game against each other.
In this chapter, we will continue where we left off at the end of Chapter 11 and implement a framework for the actual multiplayer gameplay using the lock-step networking model. We will look at ways to handle typical game networking problems such as latency and game synchronization. We will then use the sendCommand() architecture ...