O'Reilly logo

Multiplayer Game Development with HTML5 by Rodrigo Silveira

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Predicting the future with a local game server

The strategy that we will use in order to make our clients responsive, yet bound to the authoritative server, is that we will act on the input that we receive from the player while we tell the server about the input. In other words, we will need to take the player's input and predict what will happen to our game state as a result, while we wait to hear back from the server with the actual output of the player's action.

Client-side prediction can be summarized as your best guess about what should happen between authoritative updates. In other words, we can reuse some of the server code that updates the game world on the client-side so that our guess about what the output should be from the player's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required