Over a million developers have joined DZone.

Book Review: “Build an HTML5 Game”

Want to start developing games? Raymond Camden reviews "Build an HTML5 Game" by Karl Bunyan. Check out Raymond's thoughts on this awesome intro into game dev.

· Performance Zone

Evolve your approach to Application Performance Monitoring by adopting five best practices that are outlined and explored in this e-book, brought to you in partnership with BMC.

book I’ve said on more than one occasion that it was gaming that initially got me into programming. Initially just cheating at games (I hacked my Bard’s Tale save and I modified the source code in Lemonade Stand), but what I really wanted to do was create my own games. That dream pretty much went away when I left the computer science program in college and discovered the web, but I’ve toyed with the idea of building my own web-based games from time to time. A while back, I was lucky enough to get a copy of “Build an HTML5 Game” by Karl Bunyan.

As you can imagine, the book walks you through the process of building a game using web standards. The game, a simple bubble shooter you can play here, is built iteratively throughout the chapters. You start building each piece one at a time, gradually adding more features and logic to the game. It felt like a good pace to me and I only really struggled during some of the mathematical parts. (I’m a bit ashamed to say that, actually. I was pretty good at math growing up but since I haven’t really used complex math since my early college career it’s all wasted away.)

Even cooler, the author actually has you create the game with multiple different approaches. You get to experience using JavaScript to animate the DOM and then compare this to working with Canvas. I liked how the author compared and contrasted these approaches in a very practical manner.

Finally, the book wraps up by talking a bit about more advanced topics, like performance tuning, WebGL and deployment issues. This is a good section, but pretty slim. I think in the next addition this could be expanded significantly. The book’s definitely packed with information now, but making this last portion even larger could make a great book even better.

If you have any interest at all in learning how to build games with web standards, then I definitely recommend checking it out. You can find out more about the book, including seeing the table of contents, at the book’s web site: http://buildanhtml5game.com/

p.s. As a slightly off topic aside, this was my first introduction to Modernizr. While I had certainly heard of it before, I had never actually used it. The game you develop in the book makes heavy use of it and I’m happy I had a chance to actually use it. I didn’t know it had a loader feature with fallback support. That was pretty darn neat.

Learn tips and best practices for optimizing your capacity management strategy with the Market Guide for Capacity Management, brought to you in partnership with BMC.

Topics:
game dev ,performance ,html5

Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}