Making a Block Game

November 12, 2016, 12:32am

To my many, many followers, you may be wondering, what have I been up to lately?

To start with, I recently celebrated my 31st birthday. I feel great, and am excited to enter this prime year of my life. (hey, math pun!)

Since then, I’ve written hardly any Equatia code. Fear not, for I have not forsaken my duties to the aforementioned arithmetic adventure; however, there are other obligations that require attending as well. Many new opportunities are arising, and I’m extremely excited for the months ahead!

One project that I can share is a game I’ve been working on lately. Out of the 29 games I’ve built over 29 weeks, this one is by far the most fun and addictive. Like, extremely addictive. I haven’t been able to stop playing it, and the music I slapped together in garage band late one night haunts my dreams. Download the game here for Mac or Windows.

I’m really proud of this game mechanic and wish I could say it was conceived in a burst of creative inspiration. The truth is that it came together quite by accident.

Sometime last month, I had an epiphany about Equatia: Instead of mapping the four basic arithmetic operations (addition, subtraction, multiplication, division) to weapon types (hammer/smash, whip/pull, sword/cut, flame/burn/melt) like in the original design, they could be mapped to the four classical elements (earth/smash, air/blow, water/cut, flame/burn/melt), which would open up a lot of design space. I spent much of week 26 working on elemental particle effects.

During this week, I was also studying up on computer science algorithms and data structures. In particular, I had been diving deep into graph theory, so there were crazy graph traversals and Big-O computations racing through my mind.

I intended to make a puzzle game where you combine blocks to generate different elemental effects that destroy the blocks. It was very complicated and confusing. Halfway through development, I stumbled upon the 2x2-adjacent-destroy function and it was so fun, I kept playing it over and over. It was clear that this was a superior mechanic, so I quickly pivoted and the rest is history.

Most of the game was built in one day, but I spent the following two weeks adding features and refactoring block destruction to allow for a more robust scoring algorithm. I’ll save that for another post.