A game that lets players to experience software development is an excellent way to teach programming concepts and coding, such as loops and conditional statements. Zachtronics Shenzhen I/O is a game that does this. It puts players in the shoes unhappy engineers who work for a boring company and have to build computer chips by hand. They are presented with increasingly difficult circuits to design. They begin by making lights flash in a certain pattern.
The game’s interface appears very similar to www.mrworkspace.nl/2010/05/11/the-news-from-software-development-world-game/ tools used by developers in browsers and also teaches scripting. Another great example is Screeps which blends JavaScript programming and massively multiplayer online games to build self-sustaining colonies. Both games do an excellent job of teaching fundamental concepts while also slowly introducing new ones.