Games That Teach Programming

Over the years, I have stumbled upon some games that help students learn the basics of programming and introduce important programming concepts. Usually, I would use these games a class activity where the students partner up and try to beat the game.

Lightbot

Lightbot is a simple puzzle game where the objective is to guide a robot to light up certain panels in the level. Lightbot can walk forward, turn, and jump. It is available to play on the computer, on tablets and on smart phones.

Lightbot goes over three ideas of programming. The first one is creating algorithms. The player needs to layout a set of steps that lightbot needs to follow.

The second idea is abstraction. The player notices that the same set of instructions is used many times. The player can put that set of code in a function so that they can save on the number of commands they need to give to lightbot.

The third idea is the recursion. In lightbot, recursion is used to make the robot repeat a function automatically. This is done by calling the same function within itself.

I made a short lab to go with this game to get students thinking about certain computer programming concepts. It has a few questions as well as asking the students for the solution to each puzzle.

Roborally

Roborally is a board game that where players control a robot to navigate a factory floor filled with obstacles and other robots. The robots have to race to get to the flag. Players are given a set of cards that do different operations. The player must put down a set of 5 cards each turn. First robot to make it to the flag win or the last robot standing wins.

There is an actual online demo that gives 6 puzzles for the players to solve. These puzzles are more challenging than the ones in lightbot.

What I like to do with my class is to split my class into teams of 3 and make it a race. The first team to complete all puzzles win. I start them off with a printed copy of level 1. The players can not use their computers. When they come up with a solution, the players come to me, and enter their solution onto my computer. If they solve it, I give a paper copy of the next level. If it is incorrect, they need to go back and do the problem again.

What happens in this activity is that a queue eventually starts forming. If a team waits a few minutes and the solution is wrong, they fall behind in the race. 

I do it this way to teach students that they should think about their solutions carefully before they program. They should always be testing everything on paper to make sure it works before beginning the coding process. Proper planning can save them lots of time later making their software.

You can download the worksheets I use below.

Support

If you like my work, a small donation or feedback will be much appreciated.

Buy Me a Coffee at ko-fi.com Buy Me A Coffee

Leave a Reply

Your email address will not be published.