CS 184: Computer Graphics and Imaging, Spring 2018

Final Project : Virtual Reality Bullet Hell

Caleb Wyllie, 26733519

Jonathan Tan, 3031980108

Ray Pan, 3032030795


Index

Milestone Deliverables

We were planning on building our app on our iPhones, which was a bit of a struggle. Mac OS X with XCode is necessary to properly compile and deploy an Unity app onto an iPhone, but XCode was gated behind the latest version of Mac OS X, so two of our members was forced to upgrade to High Sierra. After that, trying to deploy Google’s Hello World VR as a sanity check repeatedly failed as we somehow needed the Android SDK to build on iOS. Installing said SDK was additionally a pain: manually installing the base SDK didn’t configure itself properly, so we needed to install Android Studio to let it set up the Android SDK for us. However, after we got a test build working on our iPhones, we began to make significant progress.

Google Cardboard

In the beginning, we wanted to explore what we could accomplish by looking at and building some Google Cardboard tech demos. We followed the tutorial for building a Google Cardboard application Here. By going through these demos and the documentation, we were able to integrate for Google Cardboard controlled movement of the main camera for the Unity scene.

Hello Cardboard

Accelerometer

We also were able to implement the accelerometer inputs from our phone into our camera, allowing us to be able to simultaneously move with accelerometer inputs from the phone and the rotational inputs from Google Cardboard. These inputs will be used in order for our player to move around a 2D plane (X and Y axes AKA side-to-side and up-and-down relative to the player’s orientation) in order to dodge projectiles. The current implementation is a hacky workaround, but we hope to make the movement less jarring for the player by implementing Euler Integration for more steady change in position. We learned in lecture that euler integration would lead to the position drifting from it’s correct position, but this shouldn’t be too much of an issue for us. Although it will slightly disorienting that the position in game won’t track the user’s position in real life, I think the user will become accustomed to the shift and all error will be based off of this new position, and theoretically, it will only build up error slowly.

Shader

We have been mucking around with shaders to give the game an 80’s cyberpunk/synthwave aesthetic. This is mainly done with referencing online tutorials and writing our own modified shaders to do what we want. Unity’s shader programming is done in Cg (C for graphics), an HLSL variant we’ve worked before in our fourth project.

Code for our shader

Mockup

In addition we’ve also come up with a mockup of a game that uses button controls rather than VR movement. Once the game is fleshed out some more and playable, we plan to switch over from button input to a conjunction with Google Cardboard and Accelerometer controlled movement.

Our mockup

Future Plans

As of now we have figured out the various mechanisms of Unity, a mockup that we will soon integrate the VR portion into, a method to control the camera and player with Google Cardboard in conjunction with accelerometer inputs, and some shaders to use for the game. Our next goals will to be implementing various classes of projectiles that the player will have to dodge, a way to spawn those projectiles, and an enemy class. We will also create an environment map for environment lighting.

This is Momiji Inubashiri, a boss monster found in the Touhou, a series of Bullet Hell games

Presentation Slides

Video