Review: Roguelike Development with JavaScript by Andre Alves Garzia


Here’s a secret: I used to harbour ambitions of being a games developer. The closest I came to realizing this ambition was in high school. Over the course of an evening, I taught myself how to use an early version of GameMaker. My first effort was a hyper-casual game that looked (and felt) like someone shoehorned Whack-a-Mole into the world of Asteroids.

Yes, it was as terrible as you can imagine. Much like my old MySpace posts, I’m eternally grateful that it has since been lost to time. In the years since, my career has taken me close to the world I once fantasized over. I’ve been a developer, a writer, a journalist, and a systems engineer. But I’ve never fully crossed the threshold.

Fast forward to 2022.  I’ve decided to give this whole “make a game” thing a proper shot. My timing couldn’t be better.

An embarrassment of choices

Novice game developers are spoiled with an embarrassment of choices for languages and frameworks.

Started off with Python? PyGame offers a dead-simple framework for manipulating SDL. There’s also Unity, which supports dozens of languages, and is remarkably approachable. JavaScript your thing? You can write games using the bare-metal Canvas APIs, or save yourself a decent chunk of work with a framework like Phaser.js.

I went down the latter path. Helping me on this journey is the first edition of Andre Alves Garzia’s Roguelike Development with JavaScript, published in 2020 by Apress. This (relatively short) book offers a head-first introduction to games development, focusing on the popular and highly popular Phaser.js framework.

Look: I’m a writer. I know introductions should be short and snappy. By contrast, this piece has been long and ridiculously self-indulgent. And I know introductions should hint towards the conclusion without giving the game away.

So, let me recover things a bit. Here’s my one-sentence review: This book is so good, it should be the official documentation for Phaser.js. Want to find out why? Well, I guess you’ll have to read on then, won’t you?

Clear and Breezy

I read a lot of programming books. Or, more accurately, I buy a lot of programming books. One thing I’ve observed is that authors often struggle to strike the right tone.

They are either too formal (and thus, dense and hard to read) or too informal (like O’Reilly’s Head First series). They assume different things about the reader’s confidence and competence, making it hard to determine where to start off. And many lack a practical “hook.” Without a project to follow, it’s hard to incrementally develop your skills.

Roguelike Development with JavaScript’s biggest asset is arguably Garzia’s natural flair for writing.

Technical writing is hard. Garzia translates difficult concepts with clarity and enthusiasm, and I was able to persevere through the whole book in a single sitting (admittedly, it helped that I was trapped on a transatlantic flight with no Wi-Fi access). More to the point: I was able to grok difficult concepts straight out of the gate.

This is an excellent foundational title for anyone looking to learn the fundamentals of JavaScript game development, but also serves as an excellent reference guide for anyone building with the Phaser.js framework.

Garzia does a couple of things well:

  • He doesn’t get too hung up on the technology. By that, I mean game development is a fundamentally multidisciplinary process. If you’re a sole developer, you’re likely wearing multiple hats, from lead programmer to art director. With his trademark style, Garzia effortlessly explains how these roles combine, and how to do them well. For an example of this, check out his section on sprite sheets.
  • Despite being a relatively short read, Roguelike Development with JavaScript surprisingly well-paced. Concepts – like procedural generation – are explained in good detail, but Garzia avoids getting too far into the technical weeds. Again, you’d expect that. This is an introductory book.

Roguelike Focus

As the book’s title suggests, Garzia primarily focuses on roguelike-games. He justifies this by saying Phaser is uniquely well-geared towards this genre. I’d also argue this laser-like precision allowed Garzia to create a focused and relatively breezy title.

Some concepts – like turn-based gaming and procedural generation – are genre-agnostic. Garzia points out their universality where appropriate. It wouldn’t take a genius to apply the lessons from this book into other, more different projects.

Roguelike Development with JavaScript won’t satisfy everyone though. Those with a grounding in JavaScript game development may be frustrated with its lack of dept. Its inherent hand-holding may displease experienced or intermediate developers. But if you’re just starting out, it’s hard to recommend a better foundational title.

I’m still looking for further reading. If you can recommend any books that can help me expand upon what I’ve learned here, feel free to leave a comment or drop me a Tweet.

(For the sake of transparency, I’ve included an Amazon affiliate link with this post. If you buy Garzia’s book from this post, I’ll get a cut.)

Other blogs:


Leave a Reply

%d bloggers like this: