A game that allows players to experience software development is a great method of teaching programming concepts and coding, such as loops and conditional statements. Games that accomplish this include Zachtronics Shenzhen I/O which puts players in the shoes of disaffected engineers working for an uninteresting chip company and have to build computer chips by hand. The circuits they’re required to design get more difficult, starting with making the lights flash in a particular pattern.
The interface of the game is very similar to tools used by developers in browsers and teaches scripting. Another excellent example is Screeps which is a game try here that combines JavaScript programming and massively multiplayer online games to build self-sustaining colonies. Both games excel in teaching fundamental concepts and gradually introducing other players.