Design for Another World: Western Shootout
For this design project, we (me, Jonathan Kim, Muhammad Haider Shahid, Allen Zhang, and Emma Klein) wanted to take advantage of the immersion of a 3D world, and the unique controls of VR to allow the user to experience a unique activity outside of their daily life. Thus, this is how our Unity VR game Western Shootout came to be where players can experience being the best sharpshooter in the deserts of the Wild West on their iOS or Android devices.
Initial Concepts
We wanted to focus on user interactivity and utilizing the immersion that makes VR standout from a regular 2D screen. We saw that to achieve immersion, players should have a kinetic mapping between their physical movement and their virtual experiences. Thus, most of our initial brainstorming concepts revolved around “doing” such as: paintball/carnival shooting games, escaping (escape room), casting magic (“Harry Potter” wizard simulator), sword fighting, skiing, gardening, or skydiving.
However, once we took a step back and looked at all our ideas, we realized that VR, while it can mimic reality, can also make the “impossible” possible. While ideas like gardening and escape rooms could be very immersive experiences, they weren’t experiences that were that hard to come-by. Therefore, we not only wanted an active, immersive experience, but also an unconventional experience.
One idea that we particularly liked was “shooting” as nowadays you see first-person shooting (FPS) games everywhere, e.g. Valorant, Apex, Fortnite. However, these shooting games are experienced mostly through a flat screen, keyboard, and mouse. We noticed there isn’t much user “immersion” in these games when your in-game self is actively moving around, while your actual real-life self is statically sitting affixed to your chair. In addition, real-life shooting experiences are hard to come by. There might not be a shooting range nearby, or you might not be able to afford the equipment. Thus, VR can help bridge the gap between “immersion” and “accessibility” to the general person.
Prototyping
So we decided on a first-person shooter, but what would be the main mechanic of the game and how would we implement it? There are countless shooting concepts and thematic that have been done. You can be a survivor shooting down zombies during the apocalypse, trying to fend off alien invaders with lasers. Exploring some popular VR shooting games, I was particularly inspired by Pistol Whip: a John Wick-esque game which revolves around shooting incoming enemies while dodging a barrage of bullets.
However, we didn’t have a VR headset nor motion controllers, so you couldn’t pick up objects or move the gun around. We only have an iPhone/Android with a single non-motion controller. So we had to adjust the game to work within our limited input. It took some prototyping to figure out what worked and what didn’t work.
The Gun
Every shooting game starts with a gun. Because let’s face it, what’s the point of playing a shooting game if you can’t shoot anything? In many cases, guns are the primary means of engaging with the virtual world and completing objectives. They allow players to immerse themselves in the game, and to feel like they are a part of the action. Before we can make a shooting game, we first needed to make sure the gun felt like a gun.
Since we lacked any other motion controls, we linked the gun aiming to the to the gyroscopic sensors of the phone. The player can attach their phone to a headset (e.g. Google Cardboard) and have their gun aiming reflect their actual head movement. We tested having the player move along a guided on-the-rails track (think Disney World rides) or allowing them to move via controller, but we found it too difficult to play without getting dizzy or motion-sick, so we locked the player’s other body movement.
To shoot, we wanted it so that the player just had to press a button on an external controller, and a bullet would fly to where they were looking. When we were testing out the shooting, we found it was somewhat hard to aim. To solve this problem, we observed other FPS shooting games like CS:GO often have a reticle or crosshair to help with aiming.
However, due to the stereoscopic vision of VR, you can’t simply overlay a crosshair over the camera as it needs to render in both eyes. So to add a small crosshair to the middle of the player’s camera, we rendered it as an object in front of the player. When doing this there was a chance the crosshair gets clipped by other objects, so in order to make it always appear on top of objects, the crosshair would have its z-axis auto-adjusted when the player got close too an object.
For bullets, we learned Unity’s Physics doesn’t like small, extremely fast moving objects, as most of the time bullets clipped through colliders or caused the game to noticeably lag. Also the bullet would have to spawn in front of the gun as it would look weird coming out of the player’s head. This lead to the problem of the player’s crosshair and gun not lining up, as show in the image below.
So instead of using bullets, we drew a Raycast from the player’s camera to the center of the reticle — a common technique used in most shooting games today — and used that to register a “hit” on an object. However, we still needed the player to think they are using bullets, even though they aren’t actually using bullets. We added some visual and audio feedback, so when the player shoots the gun, they know whether or not they fired and hit the target. So we added a gun shot sound effect, some muzzle flash particle effects, bullet hole markings, and a small thin line coming from the gun to help indicate the bullet path. This gave it the illusion of bullets being shot from the gun when in reality the actual hit detection comes from the player’s camera.
The Game Mechanic Itself
Now that we have the gun, what do we shoot it at? There were three main game mechanics that we wanted:
- Immerse the user in the environment and have targets in 3D space to challenge their depth perception. The player should need to move their head around in order to aim and shoot accurately.
- A score metric to distinguish players who perform well (high shooting accuracy) versus poorly (low shooting accuracy). There should be room for skill expression to reward better-performing players.
- A termination condition or ”game over” state. The game has to end at some point.
For the first bullet point of 3D targets, we experimented with different forms of target spawning and movement. For our first iteration, at a certain time interval (e.g. 3 seconds), we randomly spawned a target in the region and had them disappear after a short time or until they were shot at. However, it felt very jarring seeing targets suddenly pop into existence and then suddenly vanish. It also wouldn’t be easy to program as you could have targets accidentally spawn inside or clip into each other.
For our second iteration, to solve the clipping issue, we tried spawning multiple targets at once in waves with each wave getting progressively shorter with more targets. However, we found that most of the time targets would spawn unevenly not taking advantage of the 3D space and still felt jarring seeing them pop suddenly into existence.
For our third iteration, we were inspired by carnival games (shown in the image below) that would have moving targets. Since the player is stationary (on-rails movement caused some motion sickness as mentioned earlier), we wanted the targets instead have mobility. To mimic this effect, we had the targets randomly spawn in a flat plane and they would move steadily horizontally across the screen until out of view. Then we could have multiple of these “target spawning” planes layered in front of each other to simulate a 3D depth. Using this method, this solved the problems of uneven target spawning, jarringness of targets suddenly appearing, and target clipping while giving the depth perception of a 3D space.
Moving onto the second bullet point of the score metric, we needed some way to form of skill expression to distinguish good gameplay from bad gameplay. For our initial point system, we had all targets worth the same amount of points (e.g. 10 pts). However, we found that players would only focus on the frontmost easier-to-hit targets and completely ignored the farther back targets.
For our second iteration, we made two differently colored targets — red and blue — which were worth different amount of points. The red targets would spawn closer to the player and are easier to hit but were worth only 10 points, while blue targets would spawn farther away and are harder to hit but were worth 20 points. However, we still felt like something was missing to incentivize the player to look around the environment more closely.
Thus, for our third iteration, we added one more target type — rabbit. The rabbit target is a speedy, hard-to-hit target that occasionally spawns far away from the player. However, if the player manages to hit it, they are rewarded with 50 points. With these three target types, we could cater to casual players will offering a chance for more hardcore players to show off their skills.
Lastly, we needed some way of starting and terminating the game. Since we had no other controls besides aiming and shooting, we decided to make the start button itself a “target” which the player could shoot to start the game. For ending the game, due to the limited mobility, we couldn’t have enemies deplete the player’s health like in Pistol Whip, or have the player navigate to the end of a level eliminating all enemies. So we used a time-based system to end the game.
The final game rules:
- Player starts the game via shooting the “Start” target button causing a timer to start counting down.
- Targets appear randomly at different locations then disappear after a set amount of time.
- Before time runs out, the player has to shoot the targets in order to get points to increase their score. The score would be displayed somewhere on the player’s screen
- Red/blue/rabbit targets were worth 10/20/50 points. More difficult targets are worth more points
- After time is up, the player can see their final score, and shoot the “Start” button to try again.
Thematic
Lastly, we needed a thematic to tie our game together. We brainstormed with various ideas such as synth-wave, spies, hitman, zombies, or sci-fi. But it was hard finding cohesive assets and nothing was really tying together the gameplay and the visuals. But then I happened to find a desert scene asset, and an idea dawned on me: what about a Wild West theme? The Wild West era is a popular and well-known setting that many players find intriguing and is often associated with characters who are skilled with firearms. Combined with the wooden targets and some “cowboy” music, it would make an ideal setting for a shooting game.
Unity
As mentioned earlier, for this project, we used the Unity game engine to develop the game for Android & iOS devices. While I was familiar in using Unity for 2D games on PC, I had little experience working with 3D and VR games meant to played on mobile platforms. The biggest challenges for me were translating and rotating objects in three dimensions and figuring out how VR would affect the controls of the game as you don’t have a mouse or keyboard.
Results
After 2 weeks, we finally have the finished game prototype. As the member most familiar with Unity, I worked on implementing most of the game ideas such as the VR controls, gun shooting, designing the targets, target spawning, particle effects, sound effects, and creating the scene. Jonathan Kim helped implement the score system, timer, and start button and figure out how to build the game to Android devices. Muhammad Haider Shahid helped figure out the building to iOS devices. Allen Zhang and Emma Klein helped with the sketches for the game design and finding suitable sound effects and assets to use in the game.
You find our game here: Western Shootout. To play it, you will need to install Unity and build it to your respective device. Tilt the phone to aim and use a controller to shoot.
What Didn’t Make the Cut
Given our very limited time, our game prototype had many features that we couldn’t implement. Some things that didn’t make the cut:
- A reload feature to penalize randomly shooting
- Zooming to help the player hit faraway targets easier.
- More target types such as penalty target types that would deduct points when shot at or targets moving in different directions
- Increased difficulty levels (e.g. faster moving targets)
- High score or Leaderboard so you can compete against friends
Conclusion
In conclusion, developing a VR game in Unity can be a challenging but rewarding experience. Throughout the process, I gained valuable skills in programming, game design, and VR development, while also learning about the technical and creative aspects of building immersive experiences. Creating a VR game required careful attention to detail, from designing the virtual environment and objects to ensuring smooth performance and intuitive user interactions. The process also involved a lot of testing and iteration, as we had to constantly refine and improve the game based on user feedback. Ultimately, developing a VR game in Unity can be a fulfilling and exciting way to explore the possibilities of this rapidly-evolving technology, and to create experiences that transport players to new worlds and adventures.