PyStory

Investigating Student Engagement in an Educational Programming Game Utilising Narrative elements.


PyStory is an educational game in which a student plays as an astronaut who has crash landed on a distant planet. Throughout the game, students are required to write Python code snippets in order to ‘reset’ their crashed rocket ship’s computer. Solving these code snippets relies on an understanding of first-year Computer Science concepts such as if-statements, variable types and for-loops.

PyStory can be played in either narrative or non-narrative mode. Narrative mode gets the player to engage with the coding challenges within the game by introducing a storyline that aims to increase a player’s sense of immersion, emotional investment and transportation. Both modes provide the player with a visually appealing game-world where coding challenges are needed to be solved in order to complete the game.

PyStory provides a game-based learning system to aid learning introductory programming concepts and provides a means of testing the effectiveness of narrative elements on student engagement in isolation.

Background

Game-based learning systems have proven themselves as potentially effective tools for fostering student engagement in an introductory programming context. However, these results are subject to a high degree of variation. One such explanation for this variation is that games are complex and varied systems that utilize many different game design principles. As such, a more effective method of measuring the effect that game-based learning systems have on student engagement is to select and test the effects that specific game elements have on student engagement in isolation.

Alongside this, Narratives are utilized in games, other forms of popular media, and education to tie linked concepts together to form an over-arching thematic concept. They have also been shown to be reliable sources of engagement and emotional attachment.

PyStory has identified narrative elements of games as an effective and underutilized element of games that has a positive effect on student engagement in the context of introductory programming.

Design

PyStory consists of four scenes. One main scene, in which the player navigates around the scene using the WASD keys and three coding scenes.

The first coding scene, the Electricity Scene, requires the player to write code to reset the on-board generator of the ship. This coding scene tests a players understanding of variables and type conversions.

The second coding scene, the Water Scene, requires the player to fix the ship's water purification system by writing code fragments. This scene relies on an an understanding of if statements in order to be solved. The third and last coding scene, the Engine Scene, requires the player to write code to fix the ship's engine. This scene relies on introductory knowledge of for-loops to solve.

Implementation

The game-based learning system was implemented using the popular real-time development platform, Unity.

A Python to C# interpreter was utilized to allow students to write Python code that affected game objects using C# scripts. IronPython, an open-source implementation of the Python programming language which is tightly integrated with .NET (the framework upon which C# is built) was used to implement the Python to C# interpreter.

User Testing

To evaluate the developed game-based learning system, user testing was conducting. Participants recruited were students who had taken an introductory programming course. These students had been exposed to Python but had only learnt porgramming fundamentals. Participants were primarily first year Computer Science students at the University of Cape Town, but also included a few students pursuing different degrees who had taken an introductory programming course. Six students in total took part in the testing, three of them played the narrative version of the game and three of them played the non-narrative version.

Participants played the game for around 20-30 minutes. Afterward, they filled out a short survey incoporating the User Engagement Scale metrics to assertain their perceived levels of engagement. Then the researcher and participant had a brief semi-structured conversation about their experience playing the game to draw qualitative measures out of the participant's experience while playing.

Results

  • Narrative elements showed increased perceived user engagement.
  • Narrative elements helped to link introductory programming concepts to real world scenarios.
  • Students felt the game helped them practice basic coding concepts and that it would be a valuable tool for 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. It is also noted that there was an increased sense of aesthetic appeal between narrative and non-narrative modes, indicating that there may be unseen variables present in narrative mode that aren't solely stroytelling elements that contribute to increased engagement in narrative mode.