Book Image

Multiplayer Game Development with HTML5

By : Rodrigo Silveira
Book Image

Multiplayer Game Development with HTML5

By: Rodrigo Silveira

Overview of this book

<p>Developing an online game can be just as much fun as playing it. However, orchestrating multiple clients and keeping everyone in sync with a game server, reducing and managing network latency (all the while preventing cheating), and making sure every player has an excellent experience can quickly become overwhelming.</p> <p>This book will teach you how to develop games that support multiple players interacting in the same game world, and show you how to perform network programming operations in order to implement such systems. It covers the fundamentals of game networking by developing a real-time multiplayer game of Tic-tac-toe before moving on to convert an existing 2D single-player snake game to multiplayer, using a more scalable game design for online gaming.</p> <p>Finally you will be tackling more advanced networking topics, allowing you to handle problems such as server queries from multiple users and making your multiplayer games more secure and less prone to cheating.</p>
Table of Contents (13 chapters)
Multiplayer Game Development with HTML5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Managing frontend packages with Bower


If you're not impressed enough with npm as a backend JavaScript package manager, perhaps Bower will take you to the next level of joy. (Refer to http://bower.io/.) Bower works very similarly to npm. In fact, most commands and conventions that we've just discussed for npm work verbatim in Bower.

In fact, Bower itself is a Node.js module that is installed through npm:

npm install bower -g

We can interact with Bower the same way we've interacted with npm so far.

bower init
// … using all proposed defaults

// - - - - - - -
// bower.json

{
  name: 'npm',
  version: '0.0.0',
  homepage: 'https://github.com/formigone',
  authors: [
    'Rodrigo Silveira <[email protected]>'
  ],
  license: 'MIT',
  ignore: [
    '**/.*',
    'node_modules',
    'bower_components',
    'test',
    'tests'
  ]
}

Bower makes use of a bower.json manifest file, which by now should look somewhat familiar to you. To install dependencies, either edit the manifest by...