Author: James L. Williams
Publisher: Addison-Wesley, 2012
Aimed at: Web and mobile developers
Pros: Overview of several frameworks
Cons: Reluctance to write or discuss actual code
Reviewed by: Ian Elliot
The subtitle reveals that this book is going to focus on games using Canvas, SVG and WebGL - which seems very reasonable if a little ambitious. Canvas is a 2D bitmapped environment, SVG, which predates HTML5, is a vector environment and WebGL, which is by no means accepted as part of HTML5, is a 3D graphics system. This is a big area to cover for a book with only just over 200 pages.
When you start to read the book you quickly understand how so much ground can be covered. The first chapter is the usual lightening overview of the HTML5 technologies - media, canvas, geolocation, etc are all included even if they don't have much to do with games or graphics, and all at a very superficial level. Fine if you just want to know what HTML5 is about, but not if you want to get started with games.
Then we move on to the Canvas, which gets a single short chapter devoted to it. Again, rather than any practical examples, we have a discussion of basic Canvas drawing - transformations, state and using images. Then, you probably guessed, we have another Framework - Trident.js - a 2D animation system. The chapter closes with another simple example but even here we meet another packaged chunk of code - JFugue to handle some sound.
Chapter 6 does 2D graphics over again, but this time using SVG. Another framework enters the scene, but this time it gets a full billing in the chapter title - RaphaelJS. This time the example is a card game. Again, the problem is that, even with the help of a framework, the chapter is far too shallow a look at the problem. At best you are learning how to use boilerplate code and effects that other people have thought up.
I approached Chapter 7 with some trepidation as it claims to tackle WebGL. Again, we are introduced to Three.js, a general purpose 3D framework, and as a result we learn virtually nothing about WebGL. This isn't a huge problem but the book claims to tell you about WebGL and not a different 3D framework.
The whole book is an exercise in listing ways of doing things while minimizing the actual doing of anything. There are very few examples and no discussion of the real world of working with browsers that don't quite support HTML5. Put simply it is just too shallow.
If you want a book that provides an overview then you might find this useful. If you are a beginner it won't help much and if you are an intermediate to expert programmer then you will know most of this and more. This is no more than a tour of some interesting facilities and frameworks.