|Each puzzle is solved by typing a script.|
The basics of programming constructions are all here: sequence, selection, repetition, passing parameters etc.
The following code snippet will fend off waves of ogres:
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.|
Programming games are nothing new, though. Here is my attempt at a similar idea from a few years ago - PoopScoop.