Skip to Content

Programming through games for Middle School students

In the beginning of 2013 I was invited to offer extra-classes for Middle School students interested on programming because of classes that I had already offered about Arduino and C for High School students.

Based on my experience as programmer, teacher (of Mathematics) and Scratch user, I decided to use games as the theme for the classes.
The group started with 12 students, but the number lowered to 5 after August.
The dynamic of the classes were:
  1. I explained the idea of the game and, usually, gave to them a few initial steps. Sometimes the step were a piece of code, a file with the scenario and objects already created or some explanation about specific pieces of code they would need;
  2. During some classes (about 3 for each project), they worked at the project;
  3. By the end of a few classes (the number of classes depends of how hard the project was for them), I spent some time discussing what they have done and sharing pieces of code. The idea of these discussions were to try put them all at the same point of the project, guarantee that nobody got stuck and make sure they all realized som important aspect of the code.
After 24 classes, the students developed 7 different games. The following list explains each one of them.

1) Falling balls (version not free of bugs)
The initial goal was to explore basic movements in the stage and object collision. But with the interest of the students, the game got more complex, with different falling objects, introductory screen, score, etc.
Each group developed a slightly different version of the game and this one was the most complete.

2) Demented pixie
The game was inspired in a stage of the classic Pokemon for Gameboy in which the character has to move on a ice surface. The main goal was to explore different ways of moving in the screen, introduce variable as state flags and lists to keep the initial position of each level.
The pixie theme was added by the students.

3) Baliza com a Amanda (Parking Amanda's car)
Students asked for a game involving car movements and that was my suggestion: a parking game. After some classes working on the control of the car, they added more visual details, levels and introductory screens.

4) Coelhos saltitantes (Jumping rabbits)
The goal of this game was, firstly, make the students understand the strategy and translate the conditions for the movements of each rabbit to a list and its elements.
They got really confused about how to use the list and, at this point, I assumed a more traditional position as teacher because they seemed to be totally lost.
The parabolic movement was implemented by myself, because I wanted a specific game (number 7) to work with this particular topic.

5) Jogo das 15 casas (15 movements)
The main goal of this game was to use the "ask" block to interact with the user. Also, from the point of view of Mathematics the game is quite interesting, because it is possible to develop a 100% change of victory strategy and it involves basic arithmetics concepts.

6) Ghost buster
This game was presented almost finished but with some specific bugs for them to solve. The idea was inspired by the CCOW 2013 workshop and it worked really fine for the students develop strategies for understanding and debugging another's one code.

7) Tiro ao alvo (Hit the target):
The main goal of this game was the discussion of the parabolic trajectory of an object when launched by a cannon, for instance. No one of the students had studied this topics on the Physics classes, but all of them accepted smoothly the code involving sine, cosine, speed and acceleration.
The calculations related to the "force bar" was a challenge for them and I had to help them to find the process of finding the equation to convert the position of the selector for a value in a specific range.
They got really involved in this project, as anyone can see by the details added to the game (random scenario, etc). I can't tell exactly why, but I think is because they chose this one among a list of some possible games I had previously picked on the Scratch website.

The major difficulties along the course was following the advance of each student, as they felt really free to try while using Scratch, much more than in any other language I know. Sometimes, the time I spent understanding the code was longer than the time I needed to give the actual help to them. 

For next year I intend to star a new group with the same goal: teach computer programming through games.
This time, I want to try using more debugging and at least one "remix some game" activity. As the final project, I want to ask them to develop a game by their choice, but I still have to make clearer to myself how to evaluate them and how to get enough time to help each group. Any suggestion will be great!
From March to August 2014, I conducted the same classes in two schools.

Unfortunately, I had to finish the activities before the end of the year, but the studio below has the projects I developed with the students in this period. Some are the same reported in the article, some are new.
Excellent work! Most of these projects are suitable for high school students
 Awesome work! Are there more materials in detail about this course?
Unfortunately no, Ye.

But I am already planning the next edition of the same course and I accept any sugestion of activity.
 Nice Job!
I woul like to collaborate, too.
 Susan, the classes are over now because we are getting close to the final exams in Brazil, but I am interested in change experiences. I am sending you a private message trough this website, so we can change e-mails.
 Are you teaching Scratch now? My high school students are making games and we'd love to collaborate with you!
Susan, we can take a look at the new project I am developing with my students in 2014: