Python Programming Adventure Game

Individual educational game
Python Programming Adventure Game
Introduction/Overview
This game aims at enhancing student’s understanding about how computer works when Python
Programming lines are being executed (figure 1). This game will be helpful for the entry level
students who have taken formal teaching to recognize and correct their misconceptions. In this
game prototype module, we will only focus on a very basic program about simple math
calculation. The player will take the role of the computer and make response according to the
programming lines shown by the system. Each time when the player provides a correct response,
the program will proceed and the player can get one more score (figure 2). When all the program
lines are executed and the player get all the scores, he will win the game.
Figure 1
Figure 2
Target Audiences and Implementation Context
Our target players are the adult learners without computer science educational background who
have taken official Python programming language teaching but need to further strengthen their
learning. When they have taken the official Python programming class module, they will play this
game as a complementary learning module.
Learning Objectives
 Learners should identify how computer response when an Python assignment statement is
executed;
 Learners should identify how computer response when an Python print statement is
executed;
Hooks
The first hook is that the player will direct the avatar to take the role of the computer to give
response to each individual line in a specified program;
The player will explore and identify each step in a concrete program procedure which is an
analogy to the abstract procedure about how happened in the computer;
Every time the player make correct response, they will get a reward score and make the program
proceed successfully.
Story Overview
In this game, the player will take the role of the computer to identify what happened in the data
processing area, memory area and output area when a program is executed, which involved
assignment statement and print statement in the Python Programing language. Within the time
limitation, when the player make one correct response by clicking the mouse to direct the avatar ,
he will get one more scores and the program will proceed. When the player gives all the correct
response he will get all the scores and win the game.
Game Progression
Whenever the player has taken the official Python programming teaching, he can start the game.
Firstly, the player will be shown a program (Figure 3) which consists of several code lines. One
example is shown as follows. The system will automatically show which line is to be executed by
an animation effect. The player will use the mouse to click the part where he thinks the correct
response will happen to direct the avatar to explore the key components of the computer. If he
clicks the correct part, the avatar will be directed to move there and finish the task and the
system will proceed automatically. At the same time, the player will get one score. If he clicks the
wrong part, the system will get no response and the program will be suspended. When all the
program lines are executed correctly, the player will get all the scores and win the game.
Figure 3-Program lines sample
The Game Minute (detailed description of a short section of gameplay)
Firstly, the system will show all the four program code lines. Then it will indicate that the first
code line (a=1) will be executed. Then the player should direct the avatar to go to the memory
area to produce the data 1. Then, he will go to the tool area to bring a label (a) and put this label
onto the memory space where the value 1 is located. By this way, the system completes the
assignment procedure (a=1). After that the color of the first line will change into green.
Next, the system will indicate the second line (b=2) will be executed. After that, the player should
repeat a similar procedure like the previous step but the value should be 2.
Third, the system will indicate that the third line (c=a+b) will be executed. The player should go
the memory area to bring one value 1 to the data processing area, then, go to the tool area to
bring a PLUS to the data processing area and go to the memory area to bring the value 2 to the
data processing area. Then the system will automatically give the result: 3. Then the value 3 will
be put back to the memory area and then the player need to bring a label “c” from the tool area
to put it onto the memory space where value 3 is located. After that the statement (c=a+b) is
completed and changed into green color.
The last step is that the system indicates the fourth line (Print c) will be executed. The player will
go to the tool area to fetch a printer. Then he will put the value 3 into the printer. Then, 3 will be
printed and be output. For each step, if the player gives a correct response, he will earn one more
score. If he finishes all the steps, he will get all the score and win the game.