A game that lets players experience the process of software development can be a great way to teach programming concepts and concepts in coding features, like loops and conditional statement. Zachtronics Shenzhen I/O is a game that accomplishes this. It puts players in the shoes of angry engineers who work for a boring company and have to build computer chips by hand. They are presented with increasingly difficult circuits to design, beginning with making lights flash in a certain pattern.
The interface of the game looks very similar to web browser’s developer tools and also teaches scripting. Screeps is another excellent example, which combines JavaScript code with massively multiplayer online gaming in order to create self sustaining colonies. Both try here games do a great job of teaching the basics while slowly introducing new ones.