I feel that overall my project met its main objectives. Firstly I learned a lot about how to use unity, and how to make an application that used Google cardboard. Secondly I believe that my project succeeded in its objective of creating a game that was both familiar enough that anyone could pick it up and play it, just the same as normal Pong, while also introducing a new virtual reality element that makes the game fresh and exciting. I have showed my project to a few people, many of which were unfamiliar with the concept of Google cardboard and virtual reality. For the most part it appears that my project was simple enough that they were able to understand the concept almost immediately, but also new and entertaining enough that they actually wanted to play around with it. This concept of a simple, yet intriguing, and somewhat addictive, game was the intent of my project and I think I succeeded in reaching this goal. I also think my project was a success because it differs from most other Google cardboard applications that I have seen because it allows the user to actually interact with the program and actually play a game. Most other Google cardboard projects that I have seen simply allow the user to look around, which leads to initial entertainment that soon grows old. I believe that my game allows for a more satisfying long term virtual reality experience. Overall my target goal was to create the game, get it working with Google cardboard controls, and deploy it to my phone, and I succeeded in this goal.
How to create VR Pong:
This game was created using Unity 5.3.2. The environment consists of three cube game objects to create the walls, ceiling, and floor. These cubes were altered in x, y, and z axis to create the desired rectangle shape and size, then placed together to form two walls a ceiling and the floor. The paddles are made from two plane game objects that are identical to each other, each rotated to create an upright paddle. Rigid bodies and box colliders were added to the paddles in order to make the ball bounce off of them. The ball is a simple sphere game object with a rigid body added. The scoreboard was made from 3D text placed into the lower right hand corner of the game.
C# scripts were added to the ball, player, and opponent to make them move. A script was also added to the text to make it update. The game was first created using keyboard controls found in player.cs, then later updated for controls using Google cardboard and player.cs was replaced with playerHead.cs.
The main camera was placed at the opening of the tunnel, behind the player paddle. To add the cardboard functionality the main camera was replaced by the cardboard camera provided in the Google cardboard SDK for unity.
All assets including the scripts, and game object materials can be found at:
The game was then built in Unity with the build settings set for iOS devices. From there the game was built in Xcode 7. In Xcode the following changes needed to be made in order to build the game:
- Disable bitcode in the Build Settings tab.
- Add the System Configuration and Security frameworks in Build Phases > Link Binary with Libraries