March 2012
Intermediate to advanced
281 pages
7h 27m
English

In this chapter, we will walk through the creation of a simple multiplayer game. We will use the HTML5 canvas to display graphics to the user, WebSockets to facilitate communication with our server, and node.js to create the server.
WebSockets are truly a boon to game development on the web. Before the advent of WebSockets, game clients had to speak to the game's server by polling with XMLHttpRequest or by using Flash. The former has many drawbacks, —particularly that it is very wasteful of bandwidth, and the latter is something that we, as HTML5 developers, should like to avoid. WebSockets, ...
Read now
Unlock full access