Code Rover
Investigating Student Engagement in an Educational Programming Game Utilising First-Person and Puzzle Elements
Overview
Code Rover is an educational first-person puzzle game in which students write Python code to control a space rover and navigate an alien planet. In the game, students program the movements and actions of their rover, avoiding obstacles and collecting valuable crystals. The aim is to introduce the fundamental coding concepts of if-statements and for-loops in a visual, engaging way.The game utilises point-of-view elements to draw students into the game world and engender feelings of engagement. It also utilises puzzle elements to expose students to the problem solving required to be an effective programmer and create a sense of challenge.
Background
First-person games are highly popular, with millions of players worldwide. Despite the prevalence of first-person perspective, there have been few programming games developed that utilise this point-of-view, either in academic studies or in a commercial context. First-person perspective and its impact on player engagement is not well studied, though there is a general perception that utilising a first-person perspective increases immersion and interest in the game-world.
In the puzzle game genre, the player is required to solve puzzles and utilise their problem solving skills. This resembles the skills required to be an effective programmer - problem solving and programming are two closely related and mutually beneficial areas. Since puzzle elements offer players a chance to hone their problem solving abilities, and offer logical and conceptual challenges to a player, it was hypothesised that they could be used to create a compelling first-person programming game.
Design
The game is made up of multiple levels, consisting of seven 3D environments. The levels are scattered with various obstacles that need to be avoided, such as rocks and poisonous plants. To complete a level, students have to program the rover to get past all the obstacles. The rover's movement is constrained to a grid overlaid on the terrain (the rover's "GPS").- move in a particular direction.
- shoot in a particular direction.
- detect what objects are around it.
In terms of environment design, the idea was to provide sparse, rocky alien environments, scattered with plants and ancient ruins, contrasted by a colourful skybox. A "low-poly" art style was adopted for the game. As students play, they are faced with more challenging coding levels to test their problem solving abilities. Difficulty is introduced through the use of trickier puzzles, and the use of several mechanics that prevent the possiblity of "hard-coding" solutions. These mechanics include the addition of a line limit on the scripts students write, as well as levels in which the layout is semi-random.
Implementation
The game was implemented using the popular real-time development platform Unity.Python to C# Interpreter
Since scripts in Unity are written in the language C#, and players needed to write Python code, it was necessary to facilitate the execution of Python code in a C# environment. IronPython is an open-source implementation of the Python programming language which is tightly integrated with .NET (the framework upon which C# is built). A Python to C# interpreter for use in a Unity environment was developed using IronPython. This was incorporated as part of an architecture that enabled the player to reference Unity objects through their scripts.User Testing
For the purposes of evaluating the system developed, user testing was conducting. Participants recruited were students who had taken an introductory programming course. These students had been exposed to Python but were still at a low programming ability level. These were mainly first year Computer Science students at the University of Cape Town, but also included a few students taking different degrees who had taken an introductory programming course. Six students in total took part in the testing.Participants played the game for around 20-30 minutes. Afterward, the researcher and participant had a brief semi-structured conversation about their experience playing the game. Participants then filled out a short survey incoporating the User Engagement Scale.
Results
- User testing showed positive results, suggesting that Code Rover is effective in eliciting feelings of engagement in students
- Students responded positively to the first-person and puzzle elements, and linked them to their feelings of engagement.
- Students felt the game helped them practice basic coding concepts, and would be valuable to first year students
The conclusiveness of these results are however limited by the small sample size. It is recommended that more detailed study take place to reproduce and confirm the results
- © PyPOV
- Design: HTML5 UP