O'Reilly logo

Express.js Blueprints by Ben Augarten, Marc Kuo, Eric Lin, Aidha Shaikh, Fabiano Pereira Soriani, Geoffrey Tisserand, Chiqing Zhang, Kan Zhang

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. MMO Word Game

Word Chain Game is a real-time, massive multiplayer online game. Each player will be able to see the other online players when playing the game, along with a score leaderboard for score. In this chapter we will introduce the Promise pattern and explain how Promises simplify asynchronous operations. You will learn how to build a real-time application with Express and SocketIO, perform authentication over socket handshaking, and deal with race conditions using the atomic update of MongoDB. You will also learn how to build the game client to connect to the game server over socket, and how to debug WebSocket on the client side using Chrome Developer Tools.

Once you have mastered this, you can build similar games such as online ...

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