Skip to Content
Supercharged JavaScript Graphics
book

Supercharged JavaScript Graphics

by Raffaele Cecco
July 2011
Intermediate to advanced content levelIntermediate to advanced
278 pages
7h 20m
English
O'Reilly Media, Inc.
Content preview from Supercharged JavaScript Graphics

Chapter 5. Introduction to JavaScript Games

On May 22, 2010, Google released its own version of the retro-classic, dot-chomping game Pac-Man. The game, developed to celebrate Pac-Man’s 30th anniversary, appeared in place of the usual Google logo on the search engine’s home page (Figure 5-1). Many people initially assumed that this fun remake was created with HTML5, but a closer inspection revealed that it used nothing more than regular DHTML (excluding the sound). Continuing with the retro-classic theme, in this chapter we will develop our own DHTML game: Orbit Assault, a variation of the legendary Space Invaders (Figure 5-2).

Pac-Man was a surprise addition to Google’s home page
Figure 5-1. Pac-Man was a surprise addition to Google’s home page
Orbit Assault, an arcade game—DHTML style
Figure 5-2. Orbit Assault, an arcade game—DHTML style

Actually creating an entire game from scratch might seem like heavy going, but it’s the best way to introduce many of the concepts involved in game development.

But why limit ourselves to DHTML? Why not jump straight into using something more powerful, like HTML5 Canvas? Think of it as high-altitude training: if we can create something good with just DHTML, we are equipped to create something even better using Canvas.

Space Invaders was released in 1978 by the Japanese Taito Corporation, and was developed by Tomohiro Nishikado. He not only designed ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics, Games, and Sound with JavaScript

Graphics, Games, and Sound with JavaScript

O'Reilly Media, Inc.
Third-Party JavaScript

Third-Party JavaScript

Anton Kovalyov, Ben Vinegar

Publisher Resources

ISBN: 9781449311162Errata Page