Learning Java by Playing Video Games
Computer scientists at the University of California San Diego (UCSD) have created a video game that teaches students how to program in Java by casting spells and saving the world. The game, called CodeSpells, is a first-person, problem-solving adventure game, where the player takes the role of a wizard exploring a fantasy world inhabited by…well, gnomes. In this game, you are a wizard and your task is to learn how to read, write and cast spells (Java programs) in an interactive and fun way.
The character wakes up in a strange place populated by gnome-like creatures. She has been sent here to learn the ways of magic. The gnomes are in need of her help, they know a little magic, but don’t have enough to accomplish simple tasks. They need her help, and she needs theirs.
With some guidance from the gnomes, she takes her first faltering steps with magic. She begins to master her power bit by bit, while trying to prepare for a scary and dark future.
Please check out the site for more story details.[youtube http://www.youtube.com/watch?v=TslR9CG6yKI]
Phys.org gave an article about the project here.
Testing the game
Researchers tested the game on a group of 40 girls ages 10 to 12 in San Diego. They gave the students a brief overview of the game’s mechanics, including how to write and edit code within the game’s user interface. The girls were divided in groups of two or three. Researchers encouraged them to explore the game and see what they could do. “We were purposefully vague,” they wrote, “as we hoped to encourage a largely unstructured learning environment.”
The students were disappointed when they had to stop playing because the test was over. Their interest in the game didn’t wane when they made mistakes while writing code. Instead, they used the mistakes as a stepping stone to explore the game’s possibilities. For example, one group made the mistake of levitating an object so high into the air that their wizard couldn’t reach it. So the girls made their wizard jump onto another object and levitated it high enough to reach the object they were after. The girls also reported feeling empowered. When they encountered a difficulty, they tried different spells and made changes to the code until they solved it.
Computer science learning theory
CodeSpells was influenced by research that Esper and Foster conducted on how successful programmers learn their trade. They surveyed 30 computer scientists and identified five characteristics that are key to learn programming outside a classroom setting: activities must be structured by the person who is trying to learn; learning must be creative and exploratory; programming is empowering; learners have difficulty stopping once they start; and learners spend countless hours on the activity. Researchers summarized these findings in their SIGCSE 2013 paper, humorously titled “On the Nature of Fires and How to Spark Them When You’re Not There.”
Esper will present her CodeSpells work April 18 at Research Expo at the Jacobs School of Engineering at UC San Diego.