Game Design Virtual Reality

Virtual reality maze

Last month I wrote about how I’m working on Udacity’s Virtual Reality Developer nanodegree. My most recent project is a virtual reality maze that you can navigate to find and collect seven coins and a key.


Top-down view of the maze.
Top-down view of the maze.
A hand-drawn sketch of the maze.
Initial sketch.

Once you have collected the key, you can unlock the door to the temple, winning the game. The project required the use of C# scripting to track the state of the key and door, and to create the effect of collecting objects (animation, sound, and destroying & creating objects).

A 3D rendered coin.
A coin. Don’t you just wanna compulsively collect these?
Stereoscopic view of a 3D rendered pedestal with a key on top of it.
Spoiler alert: The key is on top of a pedestal behind the temple.

Udacity provided the starter project files, which included prefab maze walls, temple, coins, key, etc. I had to design the maze and place the walls, coins, and key in the scene to make a playable game. I also wrote scripts to create the interactions in the game, such as the sound effects and animation upon collecting coins, tracking whether or not the key has been collected, and animating the door opening. You can read all the requirements on the project rubric.

Workin’ in Unity.
More wireframes.

Gameplay video

Planned improvements

At some point I plan to come back to this project to make improvements, such as

  • Create a UI to track and display the number of coins collected.
  • Make the key collectable only after finding all seven coins.
  • Create “floating” animation for coins and key.
  • Make sound effect for trying to open the door without a key.
  • Tweak the placement of the waypoints.
  • Improve placement and symmetry of objects.
  • Add more objects of interest to the maze.


Virtual Reality

Learning virtual reality

I have been learning how to create virtual reality scenes through Udacity’s VR Developer Nanodegree. A lot of my Interactive Media students have been interested recently in 3D design, and I have been wanting to learn more about Unity for game design, so this seemed like a good opportunity to get familiar with both. I’m not sure what I’ll ultimately do with virtual reality—maybe a virtual art installation or an interactive narrative. I’m actually more interested in augmented and mixed reality, but I’ll save that for another post. Right now, I’m having fun just kind of playing around with VR and learning some new skills.

So far I’ve completed two VR projects. The first was just a basic “Hello World” type project in which I worked out all the frustrating kinks of getting my development environment working and successfully deploying to an Android phone. The second project was a little more interesting—it’s a virtual reality apartment.

A top-down view of a 3D rendered apartment.
There it is.
A 3D rendered office scene.
Virtual offices are much less cluttered than real offices.

You can’t do anything other than move around and look at the furniture. But it’s exciting to be creating a place on my laptop, and then be in that place.

Screenshot showing a stereoscopic image of a 3D rendered kitchen.
Screenshot of the app running on Android. If you look at this through a Google Cardboard viewer, this appears as one 3D image.

The most challenging thing about this project was getting everything aligned perfectly so nothing is overlapping and objects are sitting right on top of other surfaces. You’d think there would be an easy shortcut for this, but it’s more difficult than it sounds (at least with my current knowledge of Unity). I had a lot of success with vertex snapping, but with some objects that didn’t quite do the trick and I ended up just eyeballing it.

Close up of Unity interface, trying to align a globe to its stand.
Eyeballing stuff in three dimensions is a pain in the ass.
Unity interface showing books aligned together.
Look at that book alignment, tho.

If you know how to install an APK file on your Android phone and you have a Google Cardboard viewer, you can check out the scene for yourself. It’s up on my github.

Selfie of me wearing a Google Cardboard headset.
I don’t know what’s real anymore.