VR Stealth Action Video Game in Unity
Total Page:16
File Type:pdf, Size:1020Kb
VR Stealth Action Video Game in Unity Peter Do Brennan Shacklett Stanford University Stanford University [email protected] [email protected] Abstract the traditional stealth concept of cover. In 3rd person stealth games for conventional screens, the cover system We created a first person VR stealth game, along with is often very complicated and hard to implement well, an environment designed to create a captivating experience due to issues such as detecting when a player character is while allowing us to demonstrate our stealth mechanics. near cover and then using inverse kinematics to properly Our goal was to create as enjoyable an experience as possi- position the player. This typically means that even well ble both in terms of comfort and immersion. To accomplish implemented cover systems occasionally have moments this, we experimented with the tradeoffs inherent in several where they become clunky or frustrating. Conversely, the types of locomotion and environment designs, and our re- positional tracking capabilities of our HMD allow for more sults provide insight into designing a coherent VR experi- natural cover based mechanics with a player’s crouching ence. movements in the real world directly translating to ducking behind cover in the game. This leads to an overall more satisfying cover mechanic that gives players a lot of control 1. Introduction and Motivation over their own movement while behind cover. Stealth games have traditionally been a somewhat niche genre, but recent high profile successes such as Metal Gear Solid V show that the genre provides a unique opportunity for gameplay that meshes tightly with an intricate environ- ment. Additionally, there is a very basic set of core mechan- ics necessary to make a stealth game: a cover system, and a type of enemy AI to evade. In turn, these mechanics lead to a game loop between two states: sneaking and fleeing. While the mechanics are relatively simple at first glance, there can be infinite variations and possibilities within them, so we decided this would be a good place to experiment with VR game design. Additionally, we had previous ex- perience with developing within the stealth genre as we de- veloped a third person total stealth game as our final project in CS248. We thought that the challenge of taking a stealth game to virtual reality would be interesting and allow us to Figure 1. A view of the beginning of the environment from the pre- explore different angles that our previous game would not. vious game. This is the type of atmosphere we planned to recreate. Starting with the lessons learned from our third person stealth game, we decided to work from the ground up We had to deal with some limitations of VR in doing on rethinking all the mechanics for VR. In particular, we so, however. We developed the environment around move- wanted to be sure we had a game that was clearly designed ment, which we knew had to be revamped from the original for VR, rather than simply being a port of a prior game, game. We wanted our environment to be similar in aesthetic which would have resulted in a much less interesting and a to the previous game, which would allow for a more immer- worse performing experience overall. One of the key moti- sive experience. The virtual environment, however, had to vations for doing another stealth game was the possibilities take into account the different perspective shift and VR lim- offered by the position and orientation tracking capabilities itations. In addition, we had to keep in mind performance of modern head mounted displays when combined with limitations as we wanted the Oculus Rift to run at a reason- our stealth game. 2.2. Traversal One of the major issues we came across when we be- gan working on the game was figuring out how movement would work in VR. There are several existing solutions that allow player movement through positional tracking but those generally restrict the player to what the sensor can view. Mahdi Nabiyouni and Doug A. Bowman emphasize in their paper ”A Taxonomy for Designing Walking-based Locomotion Techniques for Virtual Reality” that ”Design- ers have yet to find a fully general and effective solution to solve the problem of walking in large or unlimited virtual Figure 2. The UI of the previous game included ”traces” of the environments” [4]. The paper also emphasized the fact that player character to make it easier to determine where states were natural locomotion allows for a more immersive experience, stored. decreases motion sickness, and contributes to a better user experience [4]. Despite this, devices that allow for natural traversal are not practical at this time, which limited our op- able frame rate. Movement presented its own fair share of tions to what we could work with: a traditional controller issues that we will describe in detail in later sections, but and positional head tracking. the level of freedom that existed in the third person stealth game we developed would not be compatible in VR with- out more sensors than we had and a lot more room. We 2.3. Sound Design decided that a large environment would provide more inter- Sound design was also an important aspect of the VR ex- esting gameplay opportunities and implemented a warping perience and we discovered that players could feel far more mechanism to allow players to traverse the level, primarily immersed in an environment with accurate spatial sound from cover to cover. Traditional stealth works well on its [5]. The enemies from our original game were audible own, but we decided to incorporate a time mechanic that al- and player movement was also emphasized to give feed- lowed players to save state at their current location to return back on the state of the world. We wanted to maintain the to later. This works identically to how it would work in a level of awareness provided by the audio cues given in the third person game, but players have to be more cognizant of game. A study has demonstrated that using spatial-sound their position in space as first person does not allow for as techniques in a virtual environment contributes to ”higher much of the level to be in view. levels of presence experienced, and does so with a medium to large effect” [5]. In their study, a virtual scene of a for- 2. Related Work est was shown with or without sound to participants and the questionnaires indicated that they felt more immersed with 2.1. World Design spatial-sound present. With this in mind, we worked to in- corporate spatial sound to bring players more fully into the There has been much work in the field of virtual reality, scene. particularly in the realm of video games. We found that papers discussing VR motion sickness, locomotion tech- 2.4. Motion Sickness niques, VR level design techniques, and VR sound design were insightful and assisted in the design of our game. As One issue we wanted to avoid when developing the a large environment with plenty of cover served as the main stealth game was motion sickness. There has been a large backdrop for the game, we decided that our world design amount of work done in the space of virtual reality to com- had to be different from our prior design, based on the work bat this issue and we found that with a headset that has a described in ”Designing Intentional Impossible Spaces in good field of view and resolution like the Oculus Rift, mo- Virtual Reality Narratives: A Case Study.” In their paper, tion sickness can be avoided with good game design. A the authors explain that due to space limitations in the real study has shown that field of view restrictors can be helpful world, ”impossible spaces can be utilized to enhance the to users for adjusting to a virtual reality environment, but aesthetics of [...] an interactive narrative” [2]. However, that many subjects didn’t notice the difference [1]. How- instead of interlacing different rooms together we decided ever, we felt that having a field of view that attempts to that players needed to be able to traverse a more open level be as immersive as possible adds the experience and didn’t more quickly and so we introduced the warp mechanic into generally lead to motion sickness. Regardless, we used the default field of view in the Oculus as it seemed satisfactory. While this simplified movement greatly, it left the prob- Much of the Oculus and Unity documentation indicated that lem of how to select which warp point to travel to. Although movement with a gamepad in virtual reality would lead to the option of allowing the player to select from the warp motion sickness so we avoided that. However, in a stealth points currently in their field of view using the d-pad or one game, it is important to be able to move to look over and of the controller sticks was briefly a possibility, we quickly around cover to make a plan to tackle the situation at hand. found that this system introduced numerous edge cases, be- A study titled ”Lean into it: Exploring Leaning-Based Mo- cause there is a disconnect between the relatively simple tion Cueing Interfaces for Virtual Reality Movement” indi- input of pressing left or right on the controller and which of cated that having leaning movements done with a gamepad possibly numerous points with different depth the player ac- would not lead to any motion sickness [3]. Other results tually wanted to switch focus to. To simplify the design and within the paper showed that usability, longevity of use, en- make it more consistent, we implemented a system where joyment, and presence were all not affected by the type of we consider all the warp points within a relatively small controller.