O'Reilly logo

The Web Game Developer’s Cookbook: Using JavaScript and HTML5 to Develop Games by Evan Burchard

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 6. Fighting

Relative to interactive fiction and shooters, fighting games are a new genre, but as longstanding franchises like Street Fighter indicate, they are not going away anytime soon. Whether you’re on the professional circuit or in your living room, 30 seconds to kick, punch, and fireball your opponent can be a pretty intense experience. To that end, in this chapter, we use the game.js engine to make our first two-player game.

Recipe: Getting Started with game.js

game.js is based on the Python game-making library pygame. If you have some familiarity with that engine, many of the methods and classes will be familiar to you, but it would be difficult to say that knowing one would make you an expert in the other. Even if you feel ...

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