A game that allows players to experience the process of software development can be a great way to teach coding concepts and programming like loops and conditional statements. Zachtronics Shenzhen I/O is one game that does this. It puts players in the shoes unhappy engineers working for a boring firm and have to create computer chips manually. They are presented with increasingly difficult circuits to design. They begin with making lights flash in a particular pattern.
The interface of the game looks very similar to developer tools found in browsers and teaches scripting. Screeps is another excellent example that blends JavaScript code with massively multi-player online gaming in order to create self sustaining colonies. Both games do a fantastic job of teaching the basics while gradually introducing new ones.
https://mrworkspace.nl/2012/09/22/finding-the-best-news-from-software-development-world/