A game that lets players experience software development could be an excellent way to teach coding concepts and programming like loops and conditional statement. Games that accomplish this include Zachtronics’ Shenzhen I/O, which puts players in the shoes of dissatisfied engineers who work for an uninteresting chip maker and have to build computer chips by hand. They are presented with increasingly difficult circuits to design, beginning with making lights flash according to a certain pattern.
The game’s interface is very similar to that you see in browsers, and it teaches scripting. Screeps is another great example that is a game that combines JavaScript code with massively multiplayer online gaming to build self-sustaining colonies. Both games excel at teaching basic concepts and slowly introducing others.