When we first got our hands on Oculus’ game-changing stand-alone VR tech in 2018, nobody at Vertigo Games dared imagine a mobile version of Arizona Sunshine, our hit virtual reality game that pushed the graphical and gameplay boundaries of PC-based VR back in 2016.
So how did we get here?
Arizona Sunshine is a first-person shooter built exclusively for VR that brings up to four players into the fantasy of trying to survive a zombie apocalypse. Players can handle weapons with natural movements, explore a world overrun by zombies, and put their survival skills to the test by always staying alert and checking for threats in all directions — and of course you have to physically aim and fire your virtual weapons when playing. It’s survival horror, but you’re actually inside it, not just watching on a screen.
You can check out the original launch trailer below.
We first launched the game on PC VR in December 2016, and went on to port Arizona Sunshine to all major VR platforms. including PlayStation VR and free-roam co-location VR before ultimately arriving on Oculus Quest in December 2019.
Getting the game to run at all on the portable Oculus Quest was a huge challenge, but getting it to run in a way that’s just as enjoyable as the original versions — without sacrificing anything that makes the game so much fun — seemed like it should have been impossible. But, as you can see in the final trailer for that version of the game below, we were able to make it work.
It’s that last port that we’re going to talk about today, because it proved to be one of the biggest challenges while making Arizona Sunshine, and it took a lot of hard work and creative thinking.
This is how we did it.
Why this was worth doing at all
We found two things when looking at Oculus Quest hardware for the first time. The Quest is different from other major VR platforms in that it packs everything inside a compact headset, and offers limited processing power compared to most gaming PCs. But it doesn’t make compromises with how it handles head tracking and full motion controls. It’s a system that’s powered like a portable with the features of a tethered headset, which is a combination we had never seen before.
This effectively meant that creating an Oculus Quest version of Arizona Sunshine that played like the PC VR version was not impossible, but getting it to run smoothly would be a huge challenge. We had a clear, simple goal: Bring Arizona Sunshine to Oculus Quest without changing what the game is or what it does so well.
We were confident we could pull it off, but it would take a lot of clever optimization “magic” for the final experience to be comfortable for the player. Achieving everything that Arizona Sunshine does on Oculus Quest, while running at 72 frames per second, was always going to be a nearly impossible task, but we felt it was important to try.
The work started with the most important part of any zombie game.
Hey, let’s optimize a zombie!
Zombies are one of the most important, if not the most important, aspects of the game. They inhabit the world and make up the most pressing threat to the player. If the zombies didn’t scare the player, the game wouldn’t work. It wouldn’t be Arizona Sunshine. But we also had to make sure our zombies wouldn’t be too much for the Quest hardware to handle.
We decided to give the most recognizable parts of our zombies the most detail, to make sure they looked and felt as close to the original as possible. That meant spending a lot of our polygons on the head models.
Humans naturally look at heads and eyes when encountering anyone, or anything, in both real life and VR, so we had to get those right. This is even more important in a zombie game, because headshots are the most effective ways to kill zombies. That’s just accepted wisdom. So players will always get a solid look at the head while lining up their headshots.
Notice the head. It’s way more detailed than the rest of the body.
You can see the result in the image above. We were able to greatly simplify the zombie character model — while keeping it recognizable — and also making sure the heads kept as many polygons as possible.
Does your brain care if the arm looks like it’s perfectly rendered? Of course not. But it will notice a head without the correct details very quickly, and you’ll be pulled out of the experience. The compromise allowed us to keep our zombies onscreen without eating up all the system’s computational power.
But Arizona Sunshine also includes a mechanic that makes shooting zombies so rewarding: Mutilation. You can shoot off an arm, a leg, or blow the head clean off. Where you aim matters, but making mutilation work on the Quest wasn’t as easy as it may sound.
First, let’s explain a few things
Mutilation consists of multiple systems that all have to work together, and requires a bit of understanding about how a Graphics Processing Unit (GPU) operates. Nothing actually happens on the player’s screen until we send an instruction to the GPU, no matter what else is going on in the game’s code. This instruction can be anything: draw a tree, draw a chair or even draw the smoke coming out of the gun. But we have to get the GPU talking to the screen through these instructions if you are going to see anything while you play.
We can give this a bit more meaning by comparing the instruction count for Arizona Sunshine on the PC and Quest. The PC supports around 1,000 GPU instructions while the Oculus Quest, in contrast, supports around 100 GPU instructions. That’s a huge difference, but it’s one we thought we could work around with a little ingenuity.
Why is the instruction count so limited on the Quest? We want to deliver a smooth experience for the player, and we have to deliver it at 72 fps on the Quest for you to be comfortable while playing. Fewer frames, and people might feel sick to their stomach. So we knew we could have the Quest’s GPU render around 100 objects on the screen while keeping that frame rate, but it would begin to dip if we added any more. And causing motion sickness in our players wasn’t anything we wanted to even consider.
And GPU instructions add up quickly. Let’s say you shoot an arm off a zombie. First, we have to create a GPU instruction to ‘cut’ the arm off and place it in a different object. Then we have to fill the holes we created with wound objects, one for the zombie shoulder and one for the new cut off arm object. Finally, we tell the mutilated piece to fall off once it’s disconnected from the character model. In conclusion, we have three new GPU instructions, at least, for this interaction that seemed simple on paper. Now imagine that for 30 zombies!
The solution
So how did we solve this? Well, we decided to merge the zombie object and the wound object, on runtime, the moment a mutilation happened. We had to adjust the zombie GPU instruction and add support for this, making the GPU instruction more complex, but this added complexity ended up being faster for the GPU than the extra instructions a new object would generate. Especially when there were multiple mutilations on one zombie. That answer may be a little complex for an article aimed at a general audience, but it shows that solutions to these problems do exist, as long as you’re willing to experiment, get creative, and spend the time and energy.
Another optimization we did was to pre-calculate all the limbs that could possibly be shot off a zombie, so we didn’t have to do that when the game was running. Then, we implemented a limit so there would never be too many mutilations to handle.
Arizona Sunshine isn’t just a game about zombies, however. It’s also about where you’re fighting those zombies.
Fitting Arizona on Oculus Quest
We ended up tweaking, and sometimes rebuilding, every level and every encounter based on how many zombies were spawning, and which events were happening. We were basically juggling GPU instructions to keep the FPS solid, and comfortable. .
On a quiet part of the level we could draw more of the environment, such as rocks, grass patches and cans or other litter on the ground, making the world feel more real. The fewer the zombies, the more room we had to make the world itself look as good as possible.
But we had to make room for all the zombies and thus reduce the variety of environmental props if there was going to be a large battle in that area. We had to create a lot of engine tools together with the art team that helped us optimize our levels so this would work at all.
When people think of “optimization,” if they know what the word means in this context at all, they may just think of developers having to write more elegant code. But it goes far deeper than that; we had to create all new tools and approaches to how our game worked on the hardware to hit our goals. Optimization is incredibly time-consuming and expensive, and often requires significant work on the engine itself. It also tends to be one of the last things done on many major releases.
You can see the final product in the gifs below. With a lot of work, we were able to save ourselves a lot of instructions.
But that’s the important thing to remember: Doing so takes work, and a lot of talented people working very long hours. Moving a game from a tethered VR headset to Oculus Quest is an expensive, time-consuming process, so please keep that in mind whenever you ask a developer when, or even if, their VR game will be coming to the portable platform.
How are the GPU instructions of the Bridge level, showing how it looks before and after optimization. Here is a look at the area with 143 GPU instructions:
And here is the same area with only 24 GPU instructions, after they’ve been combined.
Conclusion
The easy route would have been to remove half of the objects in the game, reduce polygon count, disable mutilation, reduce the zombie count and call it a day. But that would have meant removing the heart of Arizona Sunshine.
Oculus Quest has so much similarity to PC VR in terms of tracking and on top packs the additional appeal of untethered, 360-degree directional freedom of movement. That is why we really pushed ourselves to get as much of the original game into this remake.
The zombie mutilation, the small pieces of trash on the ground, the interactions ... it all adds up to a port of Arizona Sunshine that looks and feels like the real thing, not a hacked down copy. It took a ton of work, but it was worth it. In the end, we’re proud of how much of the original world we’ve been able to preserve.
Which is likely the most important thing to learn about your own game before you start the process of porting or optimization: What are the most important aspects of your game’s designs? What are the things that absolutely have to stay in the final release for it to be the game you want your players to enjoy?
Once you know what you can’t live without, you can begin to think about how to keep it in, and you have to be willing to put in the work to make that happen.