CHAPTER 12

image

Multiplayer Gameplay

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 ...

Get Pro HTML5 Games now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.