Monday, 2 March 2015

SpaceChem: A Gamified Programming Course (sort of)

(You will need to allow video footage in your browser for this article)

I remember playing Advance Wars: Dual Strike on my classic Nintendo DS (The big chunky grey variety from the first generation of production) and wondering how on earth the AI in that game worked. I'm sure you've thought the same about games that you've played. How does the computer know how to manage resources in Civilization V? How does any bloody thing in a game work at all? The answer all of those questions, broadly speaking, is one step at a time. 

Vidya games that me and you play use computer code to control the flow of events in an algorithmic fashion. I actually dread using the world 'algorithm' to communicate with people who aren't familiar or comfortable with what is a very scary way of saying 'recipe', a word that almost everyone understands. A recipe is a set of instructions that a chef follows one at a time in a very specific order in order to achieve a desired result. You can't put the Rice-a-Roni in the microwave until you've opened the door to the microwave first and you can't start the microwave cooking until you've closed the door again with the Rice-a-Roni inside. Computer programs obey similar principles. You need to do things one at a time, and in the right order. I'm sure my coder friends are doing some form of face-palm right now, but they're just jealous that they can't make Rice-a-Roni as well as I can.



SpaceChem is Zachery Barth's puzzle game and it challenges you to not only make Rice-a-Roni (represented in this game by fake chemistry) but also to try and do it efficiently. Although getting any solution to the puzzles is satisfying the first time you do it. The video considered to be a poor solution to the puzzle of producing Acetylene, but I had a bloody satisfying time coming up with it! Watch how a single reactor puzzle may be solved.



If you're looking for a puzzle experience that is worthy of your mighty mind, then this game is for you. If you've ever gotten any joy out of complex circuit diagrams or even producing your first 'Hello World!' message (I made the computer do a thing!) then this game is for you also. If you're wondering what all the fuss is about and the above video looks interesting more than it looks scary, you need to give this game a go. And it's not just a series of single reactor puzzles either. The game asks you to make more complex molecules which require several reactors plugged together in sequence. You might need to enlarge this video, It's a two reactor puzzle to make formaldehyde.

 

And these are just from the first hour or so of the game. But what this gameplay footage disguises is that you are stitiching together smaller functions (reactors) to create larger programs (chemical processes) as you make your way through the game. Every level completed feels like a major success and you can always revisit older solutions to improve your score and compete with the rest of the world to find cleaner solutions.

The game costs about £6.99 so I will also take this time to direct your attention to some free ways to have fun learning how to code. The Coding Game and Elevator Saga are both browser based and they challenge you to directly fix source code to progress from level to level, slowly ramping up the level of coding prowess you need to display in order to succeed. Coding is fast becoming one of those skills that are just useful to have for an increasing number of people so you might as well have some fun learning some basic principles of the discipline. SpaceChem is certainly not a bad place to start. I'll certainly want to try Infinifactory (the 3D spiritual successor to SpaceChem) when I'm through with this title.
  

No comments:

Post a Comment

Enjoy the post? Got opinions? You mad? Let's hear from you!