You are previewing Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL.

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Cover of Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL by James L. Williams Published by Addison-Wesley Professional
O'Reilly logo

9. Building a Multiplayer Game Server

In this chapter, we will build a game server to house the logic for our games and provide a communal experience for the players. Keeping in the spirit of the games we have been developing, we will be using the server-side JavaScript framework Node.js for our backend work. This will allow us to deeply integrate between our game and server-side code. Assisting Node.js will be the socketing library Socket.IO.

Introduction to Node.js

Node.js is an asynchronous server-side JavaScript environment built on the Google V8 JavaScript engine. V8, which is written in C++, is the engine that runs JavaScript in the Google Chrome browser and is known for its speed. Node treats items such as sockets, HTTP, TCP/UDP, and file ...

The best content for your career. Discover unlimited learning on demand for around $1/day.