A game that allows players to experience software development could be an excellent method of teaching programming concepts and coding concepts, such as loops and conditional statements. Zachtronics Shenzhen I/O is a game that does this. It puts players in the shoes of unhappy engineers working for a non-existent company and have to build computer chips manually. The circuits they have to create become more complicated, starting with making the lights flash in a certain pattern.
The interface in the game is very similar to tools used by developers in browsers and also teaches scripting. Screeps is a great example that blends JavaScript code with massively multi-player online gameplay in order to create self-sustaining colonies. Both games are excellent at teaching basic concepts, and slowly introducing new players.
www.mrworkspace.nl/2010/05/11/the-news-from-software-development-world-game/