Reader small image

You're reading from  The Android Game Developer???s Handbook

Product typeBook
Published inAug 2016
Reading LevelBeginner
PublisherPackt
ISBN-139781785885860
Edition1st Edition
Languages
Right arrow
Author (1)
Avisekhar Roy
Avisekhar Roy
author image
Avisekhar Roy

Avisekhar Roy is a B.Tech engineer in computer science. He has had a passion for coding since his school days. However, he had no plans to become a game programmer. His fate landed him in the gaming industry in 2010. Since then, he fell in love with game development. Avisekhar has worked in many formats of game development environment, ranging from small companies and individual studios to corporate companies and full-scale game development studios. He recently started his own gaming start-up in 2016 and is currently working on games for the mobile platform. Avisekhar has also worked with some big companies, such as Reliance Games in India, as well as a small-scale studio called Nautilus Mobile. He is now trying to acquire a position in the gaming industry for his own venture, Funboat Games.
Read more about Avisekhar Roy

Right arrow

Chapter 10. Scope for Android in VR Games

From a simple point of view, "virtual" and "reality" are two opposite words. So, a natural question is how they can mean something together. The phrase portrays an experience about an imaginary or real environment with a digital computing system.

Game environments are also imaginary or real time. However, the environments do not portray real time experience with touch, smell, sound, and sight. So, gaming has a new scope for exploration with the help of virtual reality (VR).

Let's explore the concept and scope for VR in Android games through the following topics:

  • Understanding VR

  • VR in games

  • Future of Android in VR

  • Game development for VR devices

  • Introduction to the Cardboard SDK

  • Basic guide to developing games with the Cardboard SDK

  • VR game development through Google VR

  • Android VR development best practices

  • Challenges with the Android VR game market

  • Expanded VR gaming concepts and development

Understanding VR


In the digital computing world, VR means a real-time environment created by digital computing. It means that the environment does not exist on Earth, but can be experienced with digital computing. However, it is not always necessary that VR always replicates a real environment. It has the ability to replicate an imaginary world or environment, which can be displayed on a computer screen or a VR headset (head-mounted display) device (image source: https://lh3.ggpht.com/uv8mx61-jsrbcu-EPNw1wIi4BCXg7338alepVlr7xKbKJf7eZ9EXT2U3roA8SWx1RC8=h900-rw):

Actual screen display of the Shadowgun VR game

Evolution of VR

The VR concept seems to represent modern technology, but the fact is that the VR concept was introduced around the second quarter of the twentieth century. In 1935, Stanley G. Weinbaum wrote a short science fiction story Pygmalion's Spectacles in which a description of a goggle is found. The goggle described a holographic recording of fictional experience with touch and smell...

VR in Android games


Before the latest release of Android N, there was no direct support for VR in Android. Google has realized that VR is the future of applications. Previously, Google released the Cardboard SDK to develop VR applications on Android. This SDK is still out there in the market and is being used widely.

There are already many games in the market targeting Android VR headsets. The number of VR headsets is increasing day by day. VR was not part of mainstream Android game development, but it is believed that it will become mainstream very soon as Android has now included a special setting for VR.

History of Android VR games

In the late 70s, the VR system started evolving at a rapid speed with better equipment. The result is the inclusion of VR in the mainstream Android SDK in 2016. The latest Android devices are VR capable. It is believed that most of the upcoming devices will support VR headsets.

Previously, a high-end PC or console was required to operate VR headsets. But now, VR...

Future of Android in VR


It is a known fact that VR games are taking over the gaming market. Android is growing day by day. The latest release of Android N has a new dimension of VR support. This clearly shows that Android has an immense potential for VR games. Google is potentially working on a future VR-specific platform.

There are more devices coming to market that are VR compatible. So, there is a bright future for VR games on the Android platform.

Google Daydream

Google Daydream is the next generation VR development platform. It is said to be the successor to Google Cardboard. The latest Android N will include support for Google Daydream, and it has been decided that the handsets will be announced as "Daydream-ready phones".

Google Daydream and Android N will take VR gaming on Android to new heights in the digital gaming world. The experience and the quality of the game is going to be better, smoother, and more realistic.

Game development for VR devices


There is a large space for VR in the mobile game industry. Based on Android and Google VR platforms, developers are now targeting games for VR. VR gaming is different in nature than other games. It takes users into the game world. Certainly, game design and planning are also different from other mobile games.

VR game design

VR does not fulfil the criteria for every genre. Hence, VR game design needs to done accordingly. VR games are suitable when there is a character in the game, most preferably a first person shooter or in some RPG or racing games.

The designer needs to keep in mind that the whole game world must be experienced by users through the game. Hence, the game experience is the most important factor for any VR games.

Generally, a game designer starts designing a game from an idea. Then, corresponding controls, environment, and experience are thought of. However, in the case of VR games, the developer or designer already has a defined set of features...

Introduction to the Cardboard SDK


Google Cardboard is a VR platform developed and released by Google in 2014 for use with a head-mounted device for a smartphone. This platform targets a low-cost project to encourage VR application development on a massive scale, which has proven to be fruitful till date. Google declared Daydream to be the next step for this platform on May 18, 2016.

The name "Cardboard" came from the concept of a VR device made with cardboard, which makes the device significantly cheaper. However, many third-party companies are following the same build architecture with various materials to increase its style and build quality.

Currently, Google Cardboard can be used to create VR applications only for Android and iOS. This has changed the VR development concept, which was limited to typical device and hardware specifications:

Cardboard headset components

A typical Google Cardboard headset contains the following parts:

  • A piece of cardboard cut into a precise shape

  • 45 mm focal length...

Basic guide to develop games with the Cardboard SDK


Developing games for the Cardboard SDK or any other VR component is not similar to other Android games. Let's have a quick look at the basics of Cardboard development styles and standards through these points:

  • Launching and exiting the VR game

  • VR device adaptation

  • Display properties

  • In-game components

  • Game controls

  • Game audio setup

  • User focus assistance

  • Ultimate VR experience

Launching and exiting the VR game

Normally, after launching an Android game, it performs a few automated tasks and takes the user to the menu to choose an action. In the case of VR games, it takes time to mount the Android device to a VR headset properly, so the developer does not perform any automated task just after launching the game. The game should wait for the user to start it after it is in the perfect situation for running.

For better and common experience, the game should prompt the user with a VR sign or button to start the VR game.

There are two possible exits for a...

VR game development through Google VR


Google has released a VR development kit for Android through Google VR, featuring both Android SDK and Android NDK. These SDKs supports both the Cardboard and Daydream VR platforms.

The developer can jump into VR game development through the following tasks:

  • Head-tracking system

  • Spatial audio

  • Dynamic rendering

  • UI handling

  • 3D calibration

  • Lens distortion correction

  • Stereo geometry configuration

Let's have a look at the Android SDKs for VR game development:

  • Google VR using the Android SDK

  • Google VR using the Android NDK

Google VR using the Android SDK

We will have a look at VR development with the help of the Android SDK. A VR application build can be made with the help of Gradle. Gradle can be used independently or with Android Studio.

The developer can use other tools instead of Android Studio, but it is strongly recommended to use Android Studio for Android builds. It is the most convenient method for VR application development on the Android platform.

The developer...

Android VR development best practices


Developers need to have experience of coding regular games for Android before they start building a VR experience with Cardboard. Here are a few areas that developers need to keep an eye on while developing VR games for Google Cardboard:

  • Draw call limitations

  • Triangle count limitations

  • Keeping a steady FPS

  • Overcoming overheating problems

  • Aiming for a better audio experience

  • Setting up proper project settings

  • Using a proper test environment

Draw call limitations

VR games are obviously 3D games with an extensive rendering process. It is always a good practice to minimize the draw calls to limit the rendering time and reduce GPU overhead.

In general terms, based on the list of currently available devices, the developer should keep a rendering call limitation of 100 per frame. In the current industry, most of the developers are trying to keep the draw calls between 50 and 100.

Triangle count limitations

We have already discussed the functionality of a vertex and triangle...

Challenges with the Android VR game market


We have already understood the technical challenges for developing VR games on the Android platform. Now, let's have a look at the other challenges that a developer might face while developing or monetizing VR games for Android:

  • Low target audience

  • Limited game genres

  • Long game sessions

  • Limited device support

  • Real-time constraints

Low target audience

There are very few Android users who are familiar with the VR concept and technology. Mostly, users are the common handset holders who do not have VR headsets. So, there is already a major section of the audience who are out of scope of VR gaming. This is why the VR gaming market is limited to the audience with VR headsets.

Limited game genres

We have already looked at the possible game genres in VR gaming. VR games cannot support all the game genres released to date and possibly will not be able to do so in the near future. This limitation is a serious challenge for the Android VR gaming market in securing...

Expanded VR gaming concepts and development


We have talked about only a few of the VR gaming aspects of Android. These ideas have been implemented or are currently being implemented. However, there is a broader concept of virtual gaming.

Game developers are now trying to produce real-time experiences with VR technology. There are a few real-time games that are similar to digital gaming, such as Paint Ball, Laser Tag, and so on. With the help of VR technology, these experiences can reach the next level. Using a VR headset in a predefined arena that is physically synced with the VR application environment can take the user into the game. This concept of gaming has already started taking shape. A few test arenas for VR games have already been created with the support of various other physical gears and sensors. These gears and sensors track the user's movement in real time and duplicate it within the virtual world through the VR headset display.

Simple actions such as walking, crouching, touching...

Summary


This is the era of technology. VR technology has taken the gaming experience to the next level. Android is now the most progressive platform for gaming. Joining two leading platforms can surely take the mobile gaming experience to the next level.

In VR games, the user gets the chance to be inside the game environment. However, there are a lot of limitations in developing games for Android with the VR feature. Google has already announced its upcoming VR development platform, Daydream, which includes extended controls with a separate controller.

The VR gaming industry is growing rapidly. It has its own set of advantages and disadvantages. However, there is no doubt that the gameplay experience is far better than the conventional gameplay system. So, it will not be a wrong assumption that the future of the Android VR gaming industry is bright.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
The Android Game Developer???s Handbook
Published in: Aug 2016Publisher: PacktISBN-13: 9781785885860
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Avisekhar Roy

Avisekhar Roy is a B.Tech engineer in computer science. He has had a passion for coding since his school days. However, he had no plans to become a game programmer. His fate landed him in the gaming industry in 2010. Since then, he fell in love with game development. Avisekhar has worked in many formats of game development environment, ranging from small companies and individual studios to corporate companies and full-scale game development studios. He recently started his own gaming start-up in 2016 and is currently working on games for the mobile platform. Avisekhar has also worked with some big companies, such as Reliance Games in India, as well as a small-scale studio called Nautilus Mobile. He is now trying to acquire a position in the gaming industry for his own venture, Funboat Games.
Read more about Avisekhar Roy