During the last week I participated in a 48 hour app jam. The theme for the jam was decided using VNA (verb, noun, adjective) ideation cards.
In addition to the VNA derived theme I decided to constrain my app to being a VR game to be built using Unity. This was following on from my experience last week in which I setup Unity and worked through a number of tutorials as well as build and deploy my first ever VR world to my DayDream VR headkit. Albeit a rather limited world with just a few 3d forms here and there.
I quickly decided that to honour the adjective ‘restricted’ my game would be based on a labyrinth – a typically restrictive environment with only one way out. The noun component of the theme was a little harder to work with. This was to be my first every interactive VR game so I needed to keep it simple. I couldn’t consider factoring in actual opponents in the form of a multi-player game. So, I settled for a more abstract interpretation of ‘opponent’ in the way of ‘time’. The final component of the theme, the verb, fitted naturally with my labyrinth theme. The game player would be guided through the labyrinth by some feature of the game. The feature I decided to use was 3D sound. So, to summarise my app: a VR game in which the player is guided through a restricted environment with time as their opponent.
As I own a Google Pixel 3 as well as a DayDream headset, it was natural for me to target this platform for the jam. This was the setup I’d used for my Unity tutorials and my first basic VR builds the previous week.
First, I set up my maze within Unity using some floor prefabs built from plane 3D objects and a navigation mesh. I installed the GoogleVR SDK for Unity and Google DayDream Elements. Using a free Sandstone Wall Construction asset and some sand textures I finalised the look and feel of my labyrinth.
Scripts and Build
At this point I began to work with the Google SDK to setup the scripts and prefabs neccesary to prepare the application to work with Android. This included an instant preview feature, for me to test my app as I develop without having to rebuild and deploy to my phone each time. This is where I ran into some problems. I couldn’t build the app due to compile errors within the Google SDK. I found that this was due to my version of Unity. I had to downgrade to an earlier version. While studying the documentation and various forum posts on the subject, it became clear that many developers are leaving GoogleVR and DayDream and flocking to Oculus. Indeed, I discovered that the DayDream elements github repository is archived and hasn’t been updated for two years. The GoogleVR only seems to have critical updates and it would seem that Google’s VR project is all but shelved for now.
Taking into consideration these facts I first decided to abandon the Google SDK and instead I installed Oculus SDK for Unity. However, this only caused further problems. The build time for my small project was extremly long due to the number of dependancies within the Oculus SDK. Furthermore, as I am working in a Mac environment, I had to manually install the build’s APK onto my Oculus Go device which meant I could not use instant preview. This meant it was unpractical for testing, especially given the time constraint of the app jam. Hence, I went back to GoogleVR again!
I was hoping to use a teleportation DayDream element for my game so that the player can move with smooth transitions. Unfortunately, the DayDream elements would not compile so I decided to use the basic GoogleVR scripts. At least the meant that my app would be compatible with non DayDream phones, too.
I wrote a few scripts to allow the player to change position using the VR controller and an in game countdown timer.
The sound beacons work well within the VR environment. These were added as audio source components and configured with 3D sound settings.
If I had had more time I would have liked to design an oasis at the labyrinths exit for the successful player to roam around and interact with a few objects.
This was my first interactive VR application. Built within 48 hours, with just a few hours prior experience with Unity. Although I lost quite a lot of time with SDK issues and build times, I am very excited about using Unity for further projects. The scripting engine is very powerful and the scope for building creatively inspired worlds is vast. Despite my initial troubles with the GoogleVR SDK I found the instant preview and controller scripts very useful. I would have liked to continue working with DayDream VR on future projects. However, the current consensus of my peers seems to be that the way forward, at least for now, is with Oculus. If I am going to do more with VR, I suspect I will go with Oculus, for which I will need to set up a Windows environment so as to be able to use instant preview during development.