A game that allows players to experience software development could be an excellent method of teaching programming concepts and coding features, like loops and conditional statement. Zachtronics Shenzhen I/O is one game that accomplishes this. It puts players in the shoes of unhappy engineers who work for a dull company and have to build computer chips manually. The circuits they have to design are more complex beginning with making lights flash in a certain pattern.
The interface of the game is similar to the one is found www.mrworkspace.nl/2014/02/16/mrworkspace-is-moved/ in browsers, and it also teaches scripting. Screeps is another excellent example that combines JavaScript code with massively multiplayer online gaming to build self sustaining colonies. Both games do a great job of teaching the basics as well as slowly introduction of new ones.