The Online Portfolio of Michael Jones

VR Vox – My Oculus Mobile Game Jam entry

It’s like MSPaint for VR


Oculus is having a Mobile Game Jam for the GearVR! Of course I couldn’t resist participating.

Wanting to enter as a 1 man show I needed to come up with an idea that would be both fun yet simple(So I can actually do what I intended). Coming up with an idea was tricky, but I knew I wanted to do something that involved being able to create things in VR. After brainstorming hundreds of game ideas, only a few seemed both good and feasible. I ended up deciding to keep things very simple and just do voxel cube building in VR, like MineCraft without the MineCraft. The main problem besides getting a voxel engine to run well on the GearVR is making this an intuitive program to build in using the limited controls of the GearVR’s touchpad. I am of course also providing gamepad support. Once all the basics are done and polished I can add additional features like networked world building and being able to destroy the world using physics objects.

Last Monday, Milestone 1 was due, which was a concept and description of the project. Tomorrow, Milestone 2(Screenshots!) is due. So far I’ve made a great deal of progress!

I’ve created the core Voxel engine! Creating the engine was not terribly difficult, and there’s a wealth of information out there on how to create such an engine.  I first built this in Unity 4. Tragedy happened when I built the app and ran it on the GearVR only to find it would freeze every time I added a cube 😦 I guess this is why I haven’t seen any Voxel games for VR yet. I wouldn’t be stopped. Going against the advice that’s been posted from Oculus, I moved the project to Unity 5 to see what kind of luck I would have. Surprisingly Unity 5 works way better on the GearVR! Now my engine was working as intended with no slow-downs. I’m guessing this is because of Unity 4’s physics engine which I’ve read is very slow for non-dynamic mesh colliders.

With it now technically working, I needed to start to refine the interface for building and add some colors. For colors, I am currently using vertex colors so every block can be any color. New blocks are set to random colors. I might eventually use a texture map for the colors, limit it to 16, and add some shading so each cube has some fake AO.

For the interface, I have things working quite well with a bluetooth game controller. The touchpad on the Gear has been more finicky. Trying to detect a swipe, I am tracking the mouse motions over time and the distance of my swipes has ranged from 0.1 to 20, making it hard to determine a good value for detecting swipes. The idea is that you swipe to change between adding and deleting blocks. A single tap adds a block, and if you tap and hold, you can look around to paint blocks on the XYZ plane with matches the view orientation. I’ve also been having some issues with the back button, which will give a buttonDown event, but continues sending this event after the button is released and does not stop until touching the touchpad.

VRVox_2 VRVox_1

What’s Next?

  • Adding a pie menu for saving/loading worlds, changing modes between: constructing, painting, building, navigating
  • Add a pie menu for selecting colors which are used for creating new blocks and for painting existing ones.
  • Add a eyedropper feature for getting the color of blocks.
  • Get the DPad on GameController working for changing elevation.
  • Make saving/loading work on GearVR(Already works on PC)
  • Explore lighting techniques to make look cooler.
  • Add a interesting skybox
  • Make a intro scene/menu
  • Add some music/sounds
  • Experiment with adding physics to VR Vox

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s