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

Chapter 4. Reducing Network Latency

Now that we have a working game that allows the presence of multiple players in the same or multiple game rooms, we will iterate and take care of a very important issue in online games, namely, network latency. Given the fact that you will need to think about this problem for many years to come, we will be very focused on the topics covered in this chapter.

In this chapter, we will discuss the following principles and concepts:

  • Dealing with network latency in multiplayer games
  • Implementing a local game server in the client
  • Client-side prediction
  • Interpolating real positions to correct bad predictions

Dealing with network latency

Although you may well be one of the happy citizens out there with a gigabit internet connection, ...

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