A Glance into Virtual Reality Development Using Unity

Coming from the 2D and 3D games that everybody is very familiar with, these days the world has been taken by storm with the introduction of virtual reality technology. In this paper I covered the essence of this new empowering technology through things like: a short representative definition and classification, the hardware requirements for stepping into the VR world, and the most important aspect which is the applicability of this technology in the society that we live in. Also, the main purpose of this paper was to identify which VR game engine a beginner should be using for their first project. Through the research that has been done in this article, I come to the conclusion that the most suitable game engine in this case is Unity. To further prove my statement, I developed a small project that consists of a 3D VR maze which shows how easy it is to learn and develop using Unity.


Introduction
Nowadays, virtual reality is known as the technology that allows for replacing the real world by a synthetic one, inducing users the feeling of being in another world [1].The most representative type of application that truly makes someone feel that way, is known as a VR game.Thus, virtual reality and digital games are two area which share many similar characteristics among which the most important are: both of them exploit the technological breakthroughs of several fields like electronics, computer power etc., and also, they focus on creating the best possible realistic 3D environments [2].My contribution on this paper is to help someone who has never developed a VR game choose the best game engine and, at the same time, because of the higher demand in this technology, to widespread the interest in this area.Furthermore, to prove the easiness of developing in virtual reality I will describe, based on an example, the steps necessary for making a simple VR game.

Overview of virtual reality
Virtual reality (VR), also known as virtuality [3], is a technology that involves experiencing various things through our computers, things that don't actually exist.In other words, virtual reality also represents a believable, interactive 3D computer generated world in which people can explore and interact, thus making them feel like they are there, both physically and mentally.In other words, virtuality represents a world that is:  Computer-generatedthis part of the equation represents a very important factor in generating a 3D world, because only powerful enough computers can make the experience more immersive and believable;  Believablefor the VR experience to be induced, users really need to feel like they are in that generated world, so the illusion of virtual reality will fade to back;  Interactiveto mimic the reality that we live in, users of virtual reality should be able to interact with the elements that are present in the computer-generated world, so the experience gets fulfilled;  Immersiveto assure a great connection between believable and interaction, virtual reality has to engage both body and mind of users.

Necessary hardware for virtual reality
For everybody that is willing to step into the world of virtual reality, a specific set of hardware accessories is needed to made it possible.The set mentioned above might consists of:  Head-mounted displays that consists of two small screens, one for each eye, a material that is used to stop the light that is coming from the real world and a pair of stereo headphones with the role to give users the awareness of surroundings. Immersive rooms which represents an alternative for head-mounted displays, consists of areas that contains special projectors which turn the walls into displays.This highly advanced room also contains a set of specialized sensors who can track people that are inside, thus moving the projected images according to their movement. Data-gloves that are used for giving people the ability to interact with the virtual objects making the experience more lifelike.This technology involves strapping highly sophisticated sensors on to ordinary gloves.

Uses of virtual reality
Being able to simulate real world scenarios, we can say that virtual reality has a very wide range of uses, from education to Medicine.

Education
Learning to pilot a plane, for example, can be a very dangerous activity for an untrained person.But in the last few years, because the VR technology had become better, more and more academies started to implement virtual reality simulators for this activity, and thus making the process of learning to fly safer.And also, because there are no lives at risk, students can learn complicated maneuvers faster.through the use of augmented reality technology.The first project of this type was called "GROPE" and it was introduced in 1960s at the University of North Carolina and it was about exploring the interactions between protein molecules and drugs [4].

Games and entertainment
When it comes to gaming and entertainment, VR has become more widespread than the other categories mentioned above.At the same time, in these domains, virtual reality is rapidly evolving compared to the others, mainly because there is a higher demand and also because these types of applications are easier to develop.

Medicine
Since 2009 with the introduction of daVinci surgical robot, VR has extended it's uses to medical world.This robot is basically a pair of four arms that are controlled by a surgeon remotely through special VR equipment.This make it possible for other surgeons situated in different places to join in a more complex operation and collaborate together to resolve the case.

Virtual reality in gaming
In the past few years, because of the higher demand for VR games, more and more companies started to invest in developing specific gadgets for this technology.Right now, in the VR game industry there are two main competitors Oculus Rift and HTC Vive.For a visual representation of them see Figure 1 and Figure 2.
The Oculus Rift is a virtual reality headset developed and manufactured by Oculus VR which is a division of Facebook Inc.It was released on March 28, 2016.This device has a Pentile OLED display with the resolution of 1080x1200 for each eye, a refresh rate of 90 Hz and a field of view of 110 degrees.At the same time, it has a pair of audio headphones which are tuned to provide a 3D audio effect.
Oculus Rift also has a positioning tracking system and two ergonomically designed controllers [5].

VR games development
To develop a VR ready game, a developer should take into consideration one of the following game engines that fully support this type of technology: Unity, Unreal Engine, CryEngine, AppGameKit VR, libGDX, Aper-tusVR, Torque3D, Urho3d, CopperCube and Skyline.Three of the most popular VR game engines from the list above are Unity, Unreal Engine and CryEngine.For a complete beginner in VR gaming world the most suitable game engine from the enumeration above can definitely be Unity.Moving along this chapter we will discuss the benefits of using Unity game engine over the oth-ers.First of all, the main programming language that Unity uses is C#, a language that is easy to learn, versatile, object oriented and complex.When it comes to Unreal Engine or CryEngine, the programming language that is used for developing on these platforms is C++ which is more sophisticated and harder to learn being especially used by professional developers who want a certain level of flexibility.
Alongside having a friendly user interface that is easy to use and explore, Unity also provides its users with high quality tutorials as well as a structured documentation which can be found easily on their website.In addition, for a beginner, finding assets for their projects can represent a difficult task, but this game engine has an integrated Asset Store in which the community can share assets that they create.Another advantage of using Unity over another game engine is that it has the ability to compile the games for a large variety of platform such as: Oculus Rift, HTC Vive, Gear VR, Daydream, etc.In Figure 3 are presented all the platforms supported by Unity for virtual reality.camera object and replace it with GvrMain from the imported plugins.Moving along, we added a simple plane as our ground and a skybox which we took from the Asset Store (see Figure 4 and Figure 5).For creating the maze, we downloaded a maze template from the Internet, we applied it on the plane (see Figure 6) and we started creating the walls (see Figure 7) using simple cubes by simply changing their dimensions according to the template.At the same time, we downloaded a grass texture from the Internet and we added it to the walls and the plane (see Figure 8).Next up we added a "Rigidbody", a Capsule Collider and a C# Script named Controller (see Figure 10) to our GvrMain object, so we make it behave like a character.In the added script we made the character walk automatically and stop if it looks down, and also, we store the staring position, so if the player finishes the maze he will be positioned at the starting point (see Figure 9).Figure 11 shows the final result of the project.What has to be made from now is to export the game to one of the supported platforms.

Conclusions
In this paper, we conclude that virtual reality represents a powerful tool who can empower people by allowing them to create astonishing projects.Therefore, anyone who is willing to develop a virtual reality game can easily start by using the Unity game engine, because it is simple to use, learn and has all the documentation well organized on their website.At the same time, being so popular it has a lot of third party support from the entire community which makes it more accessible.