Stevie Carnell, Garima Singh, and Gagan Sharma Link to Unity Project
The inspiration for our game came from "Virtual Reality Provides Real Therapy", in which people with phobias were presented with virtual reality representations of their phobias in a form of exposure therapy. Virtual reality has had success in providing a form of exposure therapy because of the replicability and controlled nature of the virtual environment. We wished to replicate this phobia experience but with an additional gamified aspect. We placed our game in the Wizarding World of Harry Potter in the hopes of empowering the player with the use of magic and because of the franchise's lasting impact on pop culture.
Our game allows players to take on the role of Harry Potter as he encounters three levels focusing on three different fears: arachnophobia, ophidiophobia, and nyctophobia. A unique aspect of this gaming experience is that there is no concept of "player health." Because we envisioned this game as a form of therapy, we didn't want the player to feel endangered while facing a phobia. Along the same vein, enemies do not attack the player; they move towards the player slowly or stay in the same place, allowing a more gradual interaction with the player.
Scene 1: Arachnophobia (fear of spiders)
While in the Forbidden Forest, Harry is approached by Aragog and his family from three different locations. Harry can score points by shooting fireballs at the spiders, earning more points for killing spiders close to him. Some spiders also grow in size as they approach; these spiders are worth more points the larger they are.
Scene 2: Ophidiophobia (fear of snakes)
The scene begins with Harry in the courtyard at Hogwarts. Snakes are slowly slithering towards him, but Harry is luckily a Parseltongue and can communicate with snakes. Players can speak Parseltongue to send the snakes away and earn points for doing so.
Scene 3: Nyctophobia (fear of darkness)
Harry is inside the castle when he hears an odd noise outside in the darkness of the grounds. Harry must go out and face his the darkness to confront the monster that is out there. Harry can fire spells at him until he dies.
All levels of the game use raycasting to pick and shoot at enemies in the environment. A ray is cast from the tip of Harry's wand, and when this ray hits the collider associated with an enemy, the enemy is notified via script to change its material to a highlighted shader. If the user activates the trigger while the wand ray is colliding with an enemy, the cast spell will be directed at the enemy. Specifically in the arachnophobia level, the spiders will have a small fire on their body at the exact place where the ray hit their collider. The scripts for these interactions were adapted from existing scripts in the Unity Survival Shooter tutorial and online resources (see resources below).
The two scenes that feature moving enemies (arachnophobia and ophidiophobia) make use of Unity's built-in AI navigation system. First, a navigation mesh (nav mesh) is applied to the scene that defines the navigable areas. Each enemy is then given a nav mesh agent that defines it as an object that can traverse the nav mesh. Once given a target--in this case, Harry--the nav mesh agents move intelligently around non-navigable areas of the environment to their target point. Finally, to integrate our experience with the Cardboard, we used the Cardboard SDK and created UI elements that interact properly with the Cardboard's stereoscopic rendering. The Cardboard SDK gave us a function to determine if the trigger was pulled. To create the UI, we used Unity’s available UI elements and set them up as world space objects so that they would render in stereoscopic view.
Our user tested the game with textures and audio and without either. She reported that the textured game felt more visually appealing and made her feel more like Harry Potter. She said that it was easier to see what was going on in the textured scene, especially in relation to the spells that were cast. Without textures, the spells come out as blocks that largely blend into the other objects in the background. Our user also felt that the audio added to the experience because it helped her determine where the enemies were coming from. Specifically, she mentioned that she heard a spider and didn’t see it but was able to find it because of the sound.
Our experience would be greatly affected by a change in framerate. Many of the features present in the game are called in the Update function, a Unity-defined function called every frame. For example, if the frame rate was slowed down, the highlighting (picking) of enemies would not happen as soon as the player's wand aimed at the enemy. Other examples of of features affected by Update would be firing spells and score management. Additionally, the scenes themselves would probably not render correctly to the user. Unity automatically adjusts the frame rate based on the scene and objects in the scene, and changing this might make the scene lag. Finally, some frame rates are not appropriate for every device, so changing the frame rate may make the game function improperly for specific devices.