Rube Goldberg VR Game Project
Introduction
I am in the final term of my nanodegree in VR development. My latest project was to develop a game based on the concept of a Rube Goldberg Machine, which is a unecessary complex contraption that accomplishes a very simple task. In this game, the task is to allow a ball to travel from its starting position to a goal without the ball touching the floor. I developed this project for the Oculus Rift VR headset and controllers.
Persona
I hoped to create something that was fun for all ages. I wanted the user to be able to begin gameplay with minimal instructions and/or directions.

Game Design
The player finds herself in a warehouse with a floating star and a goal on the floor somewhere in the room. She must build a contraption from a menu of available objects to allow the ball travels to the goal. Restrictions include:
1) The player must release the ball from within the bounds of the platform.
2) Completing the level requires the star to be collected and the ball to reach its goal!
3) If the players throws, drops, rolls, etc., the ball from anywhere except the platform, the “throw” will be invalid and the star will not be able to be collected.

Player Movement
The player can move around the environment through teleportation. Pressing the right thumbstick forward reveals a destination marker. Releasing the thumbstick causes to player to appear in the location of the marker. The destination marker also includes a “look” direction arrow that allows the player to chose the direction he wants to face after teleporting.

Building the Contraption
Touching the the left thumbstick reveals a radial menu with objects the player can select. Selecting one of these objects causes it to “appear out of thin air,” within arms length of the player’s left hand. The player can manipulate the objects and “daisy-rig” a pathway for the ball to travel along without touching the ground on its way to the goal.

Development
The project included a starter file that contained the warehouse assets. These were graphical assets with no scripts and no physical attributes. First, I added the ability to move around the environment via teleporting. Next, I worked on making objects interactable. I did this with VRTK, which simplified the process of making objects grab-able, interactable, and throwable. As far as the physics go, I made the planks, fans, and bumpers kinematic so they could be placed without the effects of gravity. I decided to make trampoline gravity based. It seemed logical to me that the trampoline should have to sit on the ground. Obviously, I made the ball throwable. The ball has a script that handles collisions and triggers the object’s behavior. Each of the objects has a collider, an audio source for its sound effect, and a variable for its impact on the ball. For example if the ball hits the trampoline, the direction and velocity of the ball is impacted by a variable set in the trampoline script. Also, the collision triggers the trampoline’s script that plays it’s sound effect. Next, I programmed the “goal script.” Essentially, if the ball reaches the goal, and the star has been collected, show the “you win” scoreboard. Otherwise, show the “level failed” scoreboard. There are other nuances of the game that had to be programmed like hiding the star on an invalid throw and making sure the player is standing on the platform when the ball is released, and resetting the ball if it touches the floor. I wrote code, tested… adjusted code, tested… wash, rinse, repeat until it all worked properly.
Playtesting
I tested this project with family, friends and co-workers varying from age 8 to 45. Some of my questions included:
Where are you?
What is your first impulse? What do think you are supposed to do?
Did you read the instructions?
How do you move around?
How do you add objects?
Do you understand how to play the game?
What I found was that users were immediately fascinated with the environment and weren’t particularly interested in reading the directions. For the non-initiated, teleporting is a confusing concept. Most of my testers had never experienced VR with controllers. Seeing virtual hands through the headset was “cool” but the lack of familiarity with the layout of the controls proved problematic. As a developer, I thought providing a large graphic within the game that explained the controls would be beneficial, however, only one of my playtesters took the time to use the directions/graphic to orient themselves with the controls. I ended up having to coach my testers through the first part of the game before they were actually able to enjoy playing the game.
Problems
Setting up Unity for development with the Oculus Rift was the hardest part. Up until this point, I had only built mobile VR apps (Google Cardboard) without any controllers/hands to consider. Programming for the Rift with its two controllers is a whole different animal. I ran into problems early as I followed prescribed steps for set up, and they didn’t work properly. I felt lost at times trying to figure out if I missed a step or the steps were incorrect or outdated. I spent dozens of hours watching tutorials, reading forums, and Google-ing things related to getting the proper SDK, custom packages, plugins, toolkits, etc installed to Unity before I could even get into writing my scripts. It was all worth it in the end because I now feel very comfortable getting Unity set up for VR development projects.
Conclusion

I learned a LOT from this project. In the end I have developed a VR game this is challenging and enjoyable. The project review team commented on the cleanliness my code and the thoughtfulness of my documentation. I am very proud of what I accomplished in this project. More importantly, I see how much of what I did in this project will apply to future projects.
If you would like more information or a copy of the game to play on your Vive or Rift, contact me raybreezy@gmail.com.