Rator Vaders: Week 1
I’ve had on my TODO list for several years now a simple game for learning operators commonly used in programming. Like %
. I’ve wanted to use this in my introductory programming courses, but alas, my TODO list is more of a TODO stack. The oldest items get the least attention. So, I performed a simple trick. I pushed onto my TODO stack a working group at ITiCSE 2016 for making games to teach computer science. This new item has my attention, and this game will get made.
The game is called Rator Vaders. It’s like Space Invaders, but the only aliens here are expressions. As they fall from the sky, you must defend Earth by picking off the highest precedent operator/method and evaluating it. A correct answer replaces the subexpression. The process repeats until you are left with a literal value, which may be reduced to ashes with a shot from your ALU blaster.
To help document my progression, I’m going to capture weekly snapshots of its development. Let’s commit to each Friday throughout the summer. Sound good? Here’s the first snapshot:
In this first week, we have blocked out a player who can move left and right. Standing in for an expression we have a few blocks. The middle one is the highest precedent operation, and the two on the side have lower precedence. Shooting the middle causes a new expression to start falling from the sky. It’s crude, but it’s my starting point after a couple of hours work.