CodeCombat

I've just discovered CodeCombat - a programming game that so far has impressed me greatly.

Each puzzle is solved by typing a script.
Code combat features puzzle-solving and combat, all completed by typing a script for your character to follow.  It has all the recognisable elements of any good rogue-like game, including powering-up your character with items.  New items provide access to new methods for your scripts, for example the sword provides access to the attack() method.

The basics of programming constructions are all here: sequence, selection, repetition, passing parameters etc.

The following code snippet will fend off waves of ogres:

    loop:
        enemy = self.findNearestEnemy()
        self.attack( enemy )


Needless to say, the findNearestEnemy() method can only be invoked once your hero has found a certain pair of magical spectacles.

The sound effects add to the experience, as well as helping to debug your code.  "But it's already dead", my hero says as my code attempts to kill a monster with cartoon violence again.

Each new programming element is introduced gradually, often with sample code partially written to help you out.  In this image I have just acquired a hammer that unlocks the buildXY() method allowing me to build fences.  That will keep those ogres from squashing me.

The start of a new puzzle.
The simple interface, problem-solving elements and cartoon graphics should appeal to boys and girls alike.  A perfect introduction to algorithms and coding for schools.  You don't need to create an account to play either.

Programming games are nothing new, though.  Here is my attempt at a similar idea from a few years ago - PoopScoop.

#codeCombat
#codinginschools