To create a 3D game (with animations) using the GoogleVR platform running on Android.
GoogleVR Android SDK Graphics code (OpenGL) Native Code:
The structure of the application is like a pyramid. The Application code, which is my game, runs on top of the GoogleVR SDK. This SDK is an added plugin to the standard Android SDK provided by Google. To make all the animations work, I used native (C/C++) functions from OpenGL.
The diagram below illustrates the input(s) and output(s) of the application.
The user triggers some input. This could be pressing a button or head movement (detected by phone’s motion sensors). The signals are sent to the Android application. On the receipt of these events, I constructed an input in the game application. This input caused an animation (using OpenGL), which was rendered as a VR projection using the GoogleVR SDK.
- Android Studio, 2.2.2 or higher.
- Version 25 of the Android SDK.
- Gradle 23.0.1 or higher. Android Studio will allow you to upgrade if your installed version is too low.
- A physical Android device running Android 4.4 (KitKat) or higher for Cardboard apps or a Daydream Ready phone.
Process and observations:
- Built a simple open gl program which responds to touches on mobile app
- Ported this app to vr
- I could not get the gvr sdk to run a heavy open gl process on my phone with limited resources (nexus 6P!)
- Splitting window caused crashes
- So I tried to run this on a server instead
Motivation: Not all phones can process VR and Graphics intense programs simultaneously without lag and heating up.
Advantages: The phone barely runs anything. All loads on server.
Possible to imagine the following applications:
1.A VR social app totally run in the cloud. All that the clients do is connect and display!
2.VR multiplayer games running on cloud