So, this year at Global Game Jam, I decided I wanted to do something with VR. I've had an Oculus Rift DK2 for a while, but I never really got around to using it. I sat down for about 24 hours and made a fun little retro throwback to Duck Hunt on the NES. Check it out!
This has really blown up! There's posts/articles on Reddit, Gizmodo, VICE, and CNET.
(Keep in mind I put this together for a game jam, it's not meant to be much more than a fun little game!)
Duck Hunt Theme remix used in the House is by Leonardo Zuccarelli
I finally got around to stopping at my parents' house so I could have enough space to record a video and stand up and everything, so here it is:
If you manage to watch to the skeet shooting minigame, based off Game C from the original Duck Hunt, I actually get pretty pumped when I shoot all 6 in one round. Never gotten 6 before!
Sprites in 3D, with "voxels"!
I've always really liked the way that 3D voxels look with pixel art! It's a unique look, and really stands out in VR. I wrote a quick Python script that converted a sprite into a 3D model with some amount of depth. Oh, and by voxels, I'm just going by the definition of meshes consisting of polygonal cubes. Here, have a voxelized Duck Hunt Dog in UE4:
And I was pretty excited once I got the whole hunting scene voxelized and arranged into something nice to look at.
With some performance implications (Not hitting the 75 FPS frame budget in VR can really hurt the experience, i.e., nausea or vomiting, at least with the DK2), it's pretty important that some things were billboards instead of voxelized sprites. The ducks, background mountains, and some of the trees that are further away were either billboards or non-camera aligned planes as opposed to voxelized sprites.
Hand Tracking in VR
So, if you're familiar with VR you can probably tell by the ridiculous green orb planted on my head that I'm using the Razer Hydras. Right now, it's probably the best way to get hand inputs in VR with something off-the-shelf, besides the upcoming HTC Vive from Valve/HTC.
Leaving the Razer Hydra base station on a desk leaves a lot to be desired. As you get far away from the stationary base station, it really messes up the accuracy of the device, making the gun jump around and jitter in places it shouldn't go. please someone buy me a vive or get me a vive devkit asap i have ideas i swear
I decided to opt for a head mount instead. The head mount was 3D printed from this Thingiverse post
Unfortunately, after mounting the Hydra, I was getting a sickening sensation from turning my head while keeping my hand stationary. The latency between the two units differs, so your hand tends to jump behind and "stick" to where you used to be looking for a split second. It's super disorienting.
To fix that, I basically added the Oculus Rift's rotation to the Hydra's rotation, but only for a few frames after movement until the Hydra caught up. It has some edge cases, but seems to work well enough.
With the basic design and tracking implementation down, I wanted to make the game actually fun, and have an objective. In my opinion, the game gets fun once the difficulty ramps up a bunch, near the last day around day 7. The ducks get fast and you only have one or two shots per duck. It channels my nostalgic frustration with Duck Hunt on the original NES-- but in a good way.
I decided with a day-by-day progression since the theme for Global Game Jam 2016 was "ritual", and most people were doing things about daily jobs or routines. That's basically the same thing going on here-- you're the duck hunter, it's your job.
Ducks spawn at random spawn points placed behind bushes and tree branches so they can't be seen spawning, and then fly around in a radial pattern around the field the player is in. Shooting a duck nets you 50 points, and each remaining shot at the end of the round nets you another 50 points.
Each day you have a goal for ducks shot. If you miss that goal, it's game over! If you manage to last all 7 days, you win the game. Pretty simple!
Your score is always visible in the hub level, along with the current day and duck goal. Speaking of the hub level..
Making a Hub Level for VR
In an effort to actually do some art of my own instead of using entirely Duck Hunt assets, I made all the assets shown in the house. Started with a table and two chairs, ended up with something that felt much more lively. The most important thing about VR, in my opinion, is lively. Music, moving things, interactive things.. It just feels so much better.
..unfortunately at some point, I got into a groove and forgot to take screenshots of the modeling/texturing process. I added a bunch of stuff! Not pictured: Bed and bedside lamp.
After taking a break and playing Rainbow Six Siege, I decided I had to add a radio playing the Duck Hunt theme into the house. Which can be shot, of course (Again, I was playing Rainbow Six Siege). Half the fun in VR is just interacting with things you'd be able to in the real world. It's a pleasant surprise when something goes "boom". The bottles and TV also go boom.
As far as interactables go, besides the shootable objects, there's also a skeet shooter! It's something I added in during the last hour or so of the game jam, since one of my friends mentioned Duck Hunt's "Game C".. and I thought "Game C" would be perfect for a second high scores table (Who can shoot the most clay pigeons?) when I demo this at my school's (NJIT) game dev con.
Quick clip of me playin' the clay pigeon shooter minigame.
VR is awesome. I want to do a lot more with it. I'm buying an HTC Vive day one, I'm going to continue developing for VR, and I'm going to continue posting about it here. Follow along :)
And gamedev is way more fun than my day job.