Book Review: Instant HTML5 2D Platformer

6784OT_covThis book is a Quick-and-dirty guide to get you started on 2D game development with HTML5. Being roughly 40 pages it goes without saying that you should know the fundamentals of HTML5 and JavaScript. It gets you started with a step by step approach to learning the core mechanics of a platformer.

The first half of the book gets you up and running. The author starts by teaching you how to setup your canvas and creating a basic game framework. After that we create our player, learn to check for input and move around. Then we give our player some animation and create our level to run around in.

Now in the second half the author moves on to the good stuff. We start off by by setting up a parallaxing background to add some depth. Next the author shows us how to create some items to pick up and enemies to run into. The auther then wraps it up with adding a sound effect and a graphical user interface to show your score and health.

The source code runs fine for me(I only tested on the current version of chrome). There was a small discrepancy as the book really only has one chapter but the code references two. Also the order for adding pickups and creating enemies is switched. I found a few bugs in the code. In Chapter 2 Task 3 – Adding Pickups, the author gives us a gem pickup and confuses it with a berry pickup(used in the next few sections). Also, in Chapter 2 Task 4 – Creating Enemies the bounding box is created using the texture width instead of the frame width so you collide from a lot farther away. Finally, not really a bug, but Chapter 2 Task 1 – Implementing a Parallax Background uses a solid blue background so you can’t really tell that the parallax is working(replacing the texture shows that it is).

Overall, this book is a good start to get your feet wet in HTML5 game development. It was pretty straightforward and easy to understand and follow. Each topic is explained in a very nice manner. The author starts with an introduction to the topic. He then tells us how to implement it explaining the code and then giving us a code snippet. Finally, the author wraps it up with what we accomplished in this section and how it all works. For under $10 this is a nice little introduction to game development with HTML5, you can check it out here.

 

I give it: 4/5

Leave a Reply