Book Review: Building JavaScript Games for Phones, Tablets, and Desktop

JavaScript Reviews This post may contain affiliate links. If you buy something we get a small commission at no extra charge to you. (read more)

Who doesn’t love the idea of creating their own video game? It’s a fun project that grants incredible freedom with loads of opportunity at every corner.

Unfortunately the world of programming and game design is dense. This is what really caught my attention reading Building JavaScript Games for Phones, Tablets, and Desktop written by Arjan Egges.

The content seems to just flow naturally and there’s a very easy course of action to follow. You should probably understand a good amount of JavaScript before picking up this book. And if you already do then you’re in for a lot of great ideas, powerful exercises, and many code samples that really drive home the key components of any great video game.

Book Contents

The book organizes into five main sections with individual chapters in each section. This is all packed into 444 pages with a short foreword and a lengthy index.

The five key sections break down as:

  1. Getting Started
  2. Creating Colorful Games
  3. Jewel Jam
  4. Penguin Pairs
  5. Tick Tick

Early in the first chapter you’ll learn about the basics of game development with JavaScript. This isn’t a boring intro by any means. It actually covers the fundamentals of game design and forces you to really think about what sort of games you’d want to build.

The second section talks about game objectives, worlds, and the delicate situation of handling player inputs(AKA building game controls).

In the later chapters you get to build unique games from scratch with heaps of source code referenced in the book. Along the way you’ll learn a variety of different game techniques like storing data and maintaining object interactions/collisions on a game screen.

The very last section talks about game production and publishing. This is really fun because you get to read interviews from two talented guys in the game industry. One is the creator of Gamemaker and the other is a creator of the wildly popular Angry Birds mobile game.

Topics include buying and using game assets like graphics and sounds along with finding the proper routes for distribution.

I’m simply at awe of how much content is in this book. It seems like an unknown title yet it’s basically the ultimate collection of guides, tools, JS resources, and game design tips from game professionals.

The author Arjan Egges is clearly knowledgeable with a unique style of writing that just connects well with anyone.

All the source code worked flawlessly for me and I had no problems finding solutions to problems when debugging. It is possible to enter this book with no JavaScript knowledge, but I would highly recommend learning a little first. It’ll make the journey so much easier and a lot more fun.

Understanding fundamental concepts like “this” and object-based coding will help you excel much faster. But honestly you can just get started and take breaks to learn these concepts on the side.

This is one of those books that offers a feedback loop for those who put in the work. When you first start there will be a lot of things you simply don’t understand. But as you work through the lessons these difficult concepts will reveal themselves and start to make sense, which in turn helps you understand even more concepts.

Everything in this book can be followed from start to finish many times and still teach you something new each time. It’s the perfect book for any game developer’s bookshelf and the guided tutorials just seem to keep on giving the more you comb over them.

Pros and Cons

The good things and bad things about this book will differ from person to person. The code is very technical and it forces you to write JavaScript from scratch. I personally love vanilla JS and working with HTML5 APIs so this was a pleasure. Others might not think so.

If you’re looking for pre-built libraries for game design then you may want to look elsewhere. Most of this book expects you to work with raw JS code and build your own engines from scratch. HTML5 and JavaScript are a powerful combination, but they also require a lot of effort.

It’s true that game libraries can save you time during development. But it’s also true that if you rely heavily on libraries you’ll have a tougher time understanding the fundamentals of game programming.

I think this book is the absolute best product you could buy for teaching yourself this content from scratch.

But my only real complaint is the complexity of app development and just how much source code is required. To most readers this will sound like a good thing! And in truth it really is.

However when you’re working through these tutorials you’ll have to constantly reference previous lessons for code snippets. Flipping around can get tiresome and it makes this book a little tougher than I expected.

But in that process I learned a great deal about developing games that can actually work in a real marketplace. And for that I’d say the potential drawback of overly-complex source code is easily overshadowed by just how much knowledge is packed into this book.

I can’t say this is a beginner’s guide because you really will have a better time if you work with a background in JavaScript development. However if you’re willing to teach yourself as you go then this book might be the perfect place to get started building your own HTML/JS games from scratch.

Final Summary

While the technicality does ask a lot of the reader, I think this book is well worth the effort. You definitely get out what you put in so I would highly recommend this to anyone that’s passionate about game design.

Building JavaScript Games is not an easy book. However you’ll learn so much in these pages that it’s likely the best book you can get on the subject. The tutorials are very clear and straightforward because they’re grounded in reality. They teach you real-world game concepts that you need to think about when designing your own games.

The extra tips on game publishing and the interviews with professional game designers only add more to this already incredible publication. I’d give this a very high recommendation for anyone that wants to get into JS-based game development.

Review Rating: 5/5


Alex is a fullstack developer with years of experience working in digital agencies and as a freelancer. He writes about educational resources and tools for programmers building the future of the web.