A 3D first-person problem-solving adventure game has been developed by computer scientists at the University of California, San Diego. Players in the game use the Java programming language to solve problems within the game environment. When testing the “game” students were “disappointed when they had to stop playing because the test was over”. The researchers found that within just a single hour of gameplay the students (girls aged 10 – 12) had “mastered some of Java's basic components” and were seeking more creative ways to use the programming language.
The game is called CodeSpells. In the game you play the part of a wizard who arrives in a land populated by gnomes. During his travels, around the game’s 3D environment, the wizard helps the gnomes regain their lost magic. To do this the wizard conjures up magic spells; these spells aren’t written in olde English, Latin or even runic symbols but in actual Java.
William Griswold, a computer scientist at the Jacobs School of Engineering at UC San Diego explained “CodeSpells is the only video game that completely immerses programming into the game play.” Stephen Foster, another lead student in the study said “We’re hoping that they will get as addicted to learning programming as they get addicted to video games.”
To spur players on there are not only tasks, where you type in/edit these code-spells to help out other characters in the game, players can also gain badges when they complete quests and master certain spells. This way, according to the report on Phys.org, “By the time players complete the game's first level, they have learned the main components of the Java programming language, such as parameters, for if statements, for loops and while loops, among other skills.” Furthermore they found, just like with any “good” game, the students were disappointed when they were asked to stop playing this adventure.
The learning theory behind the game is based upon a survey of 30 successful computer scientists and how they learnt their trade. It was found that a key to successfully learning programming was putting in effort to be creative and explore programming possibilities, finding it difficult to stop an activity until a problem is solved. The game helps people who don’t feel that way about programming get through the difficult first steps, which could otherwise be frustrating and discouraging, by making the learning task into a game.
The scientists from the University of California, San Diego intend to release the game for free and make it available to any educational institution. The game is currently being used in further testing in the San Diego schools area.