12 Free Games to Learn Programming.
Mybridge
47812

What about Colobot? It was a very nice game to learn programming. It’s quite old now but it became free in 2012.

You can find the game on my blog:
https://pawex3.blogspot.com/2016/11/colobot-19-en-original-full-version.html

Wikipedia:
https://en.wikipedia.org/wiki/Colobot