Wu's castle: teaching arrays and loops in a game

We are developing games to teach introductory computer science concepts to increase student motivation and engagement in learning to program. Wu's Castle is a two-dimensional role playing game that teaches loops and arrays in an interactive, visual way. In this game, the player interactively programs magical creatures to create armies of snowmen. The game provides immediate feedback and helps students visualize the execution of their code in a safe environment. We tested the game in a CS1 course, where students could earn extra credit to play Wu's Castle. Our results show learning gains for game players, compared both through pre- and post-tests differences and improved performance on relevant final exam questions when compared to students who did not play the game. The results of this study suggest that Wu's Castle implements good practices for teaching programming within a game.