Games where you need to write code to win - in order of difficulty
https://blockly-games.appspot.com/maze
- Navigate through a maze using a slack-like block language
- Teaches loops and conditionals
http://lightbot.com/hocflash.html
- Move a robot round a level, turning on lights
- Uses totally visual commands, useful for kids with reading difficulties
- Teaches procedures and recursion
Navigate a warrior through a maze, picking up gems and fighting monsters
- Requires writing text commands to control the character, but the interface prompts them to enter the right text
https://www.bloc.io/ruby-warrior
Navigate a warrior through dungeon levels, sensing and attacking monsters, healing damage and opening chests
- Requires intermediate-level ruby
- Also available as a gem https://github.com/ryanb/ruby-warrior
- Learning notes for the gem: http://tutorials.jumpstartlab.com/projects/ruby_warrior.html