VR Game Foundations
Posted 08/01/2019

In a goal to keep my website alive, I decided at the start of the year to upload something or make a blog post every week. Originally I had planned to do a daily drawing for the entire year, but felt this would be difficult to keep up and not the best use of my time. At the moment I’d rather improve my skills in multiple areas than drawing things. I think something every week is much more manageable yet still a bit of a challenge. 52 posts seems like a lot. Its also probably more than the current total items I have uploaded here (Even though I’ve been running this thing for 6 years).

This week I wanted to talk about what I have been developing these past few months and the progress I have made. Over a year or so ago after experiencing VR, I was in awe of the possibilities and since then I’ve wanted to develop something on my own for it. I did various tests in 2017 to find what worked, creating little rough game mechanics and working with VR interaction systems. Eventually I planned out 3 possible ideas for VR, all very different to each other and making the most of VR capabilities. Ultimately, my goal is to get one of these on steam or a similar platform (Perhaps even all 3). So last year a finally bit the bullet and bought my own headset. This has allowed me to get started in my own time.

My first idea (and strongest) that I have developed the most so far, is a co-op game where one player is in the headset and the other is at the computer. Its also a little spooky. The selling point for me is that the level is procedural, so every time you play you get a unique experience.

I’m planning to get a prototype complete to test out on as many people as possible, to see if the idea is worth pursuing further. I’m already half way there in development, so imagine it’ll be ready to test soonish.

I built a level generator first. Started with just a straight line, then made it more complicated by adding junctions and corners. To make developing a level a little easier, I decided each segment that spawns is an entire room or corridor. Instead of the original plan for multiple segments to make up a single room.

I then started to build a UI map around the level generator. Spawning room graphics accompanied by buttons and elements to interact with. One of the main features for this game is being able to control cameras to see the level through a unique perspective. So when a camera spawns, a button shows up in the UI to connect to it. Eventually the player will also have the ability to ‘hack’ items on the map, so I need to build a system around that.

Next came building basic interactions with doors, lights, and keys. I created an inventory system to store interacting items, as carrying around one item in each hand would be a pain to manage. Using just a simple teleport function for now, but plan to have eventually 2 different options for locomotion because there is becoming a distinct disdain for teleportation in VR.

The player viewing the cameras would need to have a visible version of the VR player actually traversing the level. So I decided to build a rig from scratch to represent the players poses. Still a little rough, I linked the hands and head to the tracked VR positions, then had the torso follow certain values from the head. The biggest issue was giving the rig feet because feet tracking is not officially supported with the rig yet. I decided to raycast the ground and had feet follow those positions, only letting one foot move at a time to give that ‘stepping’ motion. Finally I managed to link up the arms and legs with IK chains to simulate elbow and knee joints. Obviously it needs more work, but now it gives an impression to the players body poses.

I have a long way to go until this project sees a completion date, my main milestone at the moment is to produce a prototype I can extensively test out. I plan to add a hacking system with various minigames or puzzles, as well as an in-depth enemy and hide system. Basically, the idea will evolve with the testing to find what works and entertaining to play. The other 2 VR projects, which I am excited about, will be in future updates as a majority of my time is being put in this project.