Implementing Interaction with Items in Virtual Reality, pt 1
There are lots of differences in developing a virtual reality game compared to developing a desktop first person game. Most of these differences are quite obvious, but without first hand experience in VR development, they might come as surprise.
One of biggest differences is how player handles the items in a virtual world. In a desktop game, you have a mouse and keyboard, or game controller. Regardless of that, you as a player do not actually touch any of those items in game world, you just punch in commands, and then you see a pre-animated interaction with the item.
In VR game this is different. If you want a really immersive experience, player should be able to actually grab and use those items in a suitably natural way using hand controllers (e.g HTC Vive controllers and Oculus Touch). Player can reach for a item, grab it any way he wants, toss it away, use it etc.
Our aim is to develop not only an immersive science fiction VR game world, but also an immersive game experience. Thus, any kind of unnatural menus or too complex key combinations are out of the question. Grabbing and using items must be as natural as possible using current mainstream VR technology. You have to cut some corners, but ease of use is the key ingredient.
As a sidenote: Yes we know there are all kinds of new VR datagloves and other accessories, but they are not mainstream products and using them as a mandatory part of game experience would narrow the group of potential players to almost nil. So, from development point of view, they are waste of time.
As an example of our style of development we can go through how I implemented the use of weapons and containers in our game. These videos are made using HTC Vive with roomscale movement. All this was implemented in 2 work days, which gives you some scope about how much time it takes to implement a VR game world with hundreds of interaction enabled items with some special features.
First of all, I programmed the input functions in such way, that grip button works as a switch. When you reach for an item (that you can grab) and press grip button, you get a hold on item and it stays in your hand as long as you press that grip button again. This makes it easier to keep items in your hand for long periods of time, since you do not have to keep it pressed.
Also, you can grab item into your hand in any position you want, as you can see in videos. I grab the gun at several points, like barrel, stock etc. Since both your VR hands are totally independent, you can grab two guns, one in both hands.
If item has a primary function – in the case of a gun it is shooting – that is activated with trigger, naturally. Press the trigger, and bang – if your gun has ammo. If you have two guns, then they shoot independently. Left trigger shoots left gun, right trigger the right gun.
But to get even more immersive experience, I programmed some additional features in the gun concept. Those guns can be assembled. You can attach and deattach components, and in the future modify guns with silencers, scopes, various magazines etc. In the video you can see how scope is removed and put back again.
Magazines can be removed by either taking them off with other hand, or pressing eject button (and clip falls away). Magazines are interchangable between guns, of course, and you can load different magazines with different ammo. Basically, I have tried to make all functions as they are in real life. In the future, you have to actually load those magazines with individual bullets.
Videos reveal a basic carrying system that I will develop further. As you can see, you can sling your guns on your back, and then take them out again. So, you can travel and do other things, and carry that gun on your back just like in real life.
There is also a backpack, that can hold items. You can put that backpack with all items in it on your back, and when you need an item, you take if off you back. Keeping backpack in one hand, you can reach and take out those items stored in it. And put them back in it, of course. That backpack is an item just like everything else, so you can actually leave the backpack somewhere for safekeeping.
This system is still very crude (it took only 2 days to implement), but through iteration of testing and further development we hope that it will give an immersive, natural experience of interaction within virtual world.
(Originally published 19 Mar, 2017)
Recent Comments