On my first day at Untold our Design Director approached me about a virtual reality project involving the Oculus Rift and Arduino input. He wanted to provide users with a semi-realistic experience of surfing within a simulated virtual environment. After further processing the goals of the initiative we decided to move forward with a gamified experience.
We landed on Unity as our game engine to build in both because of its multifaceted drag and drop atmosphere and its ability to handle all necessary third-party plugins such as Oculus and Arduino. Not only did we have to build a virtual environment and write the software to control the game logic, but we also had to build the physical platform that would provide the input for the game. To give the user the sensation of actually surfing we mounted a real surfboard on the axels of an old skateboard. We connected an Arduino board with a gyroscope sensor to the bottom of the surfboard so we could read the tilt of the surfboard over time and pump the values into Unity. The values read off the physical board and fed into Unity would then manipulate the surfer’s virtual board.
The major task involved in this project was not the creation of the virtual world. Unity gives designers and developers the ability to create environments in a matter of hours, provided all necessary assets are available. Furthermore, the integration of the third-party plugins, such as Oculus and Arduino, ended up being as simple as importing their exclusive packages from the Unity Asset Store. The real challenge ended up being the construction of the physical platform for the surfboard as well as the interpretation of the data streaming from the Arduino sensors into Unity. The board needed to be able to retrieve balanced and accurate readings while still functioning safely as a stable platform for the user. The interpretation of the data stream would need to compensate for the construction designs chosen.
After many attempts, a final prototype was designed and completed. But figuring out the workings of the data stream ended up being a bigger problem than expected. The gyroscope board chosen did not output the readings as expected. With only a day until the event, we had to improvise with the numbers we were receiving. Although the readings weren’t what we had desired or expected, we were able to produce a playable, but not perfect, version for the event.
Despite having an imperfect prototype, the event went well and attendees had so much fun surfing in our virtual world. After the event we set out to find a different Arduino board system that would give us more accurate readings off the board. We knew that the solution could require redesigning the board platform. Through research it was determined that we were making things more complicated than they needed to be. It was unnecessary to have a gyroscope or accelerometer; we could get data that produced the same output from a couple of simple pressure sensors. We placed these pressure sensors on the bottom of the platform and added a cushion that would apply pressure from the board to the sensors. We also made some design changes on the platform to give users a better tilt on the board. These modifications improved the game dramatically. Recently, we’ve been refining our graphics and code. And we’re exploring opportunities to port it over to Google Cardboard and Samsung Gear.