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

Summary

Hopefully, this chapter got you excited about the unique aspects of multiplayer game development. We took an existing single-player snake game and broke it apart into an authoritative server component and a socket-driven frontend component. We used Socket.io to link the game client and server together in a very seamless integration with Express. We also discussed the concept of a game lobby and game rooms as well as the way to match players into the same game world.

In the next chapter, we will improve our Snake game by adding reduced network latency with client prediction and correction as well as input interpolation. We will also fix the game server's game loop for smoother and more efficient game play.

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