top of page
  • Writer's pictureMike

Dissertation Diary: VR Arcade Retrowave Genesis [1/2]

Updated: Oct 25, 2020

Welcome to my dissertation blog!


So as explained in the first blog, this space will be used for showing updates to the project I am and will be developing over the course of the academic year. My intention is to add a new blog each week during the weekend, and in the event that a blog is late then I'll be sure to explain why. The early stages of blog writing will no doubt be rough around the edges, and I'll endeavor to find ways to make the blogs as interesting to read as possible through images, videos etc. where possible. For now, I'll break down what my dissertation is going to be.


The (currently untitled) project is going to be a virtual reality (VR) game that draws heavy inspiration from classic arcade games whilst combining elements from some of my favourite VR games. Development is utilizing Oculus Rift and Oculus Quest equipment for testing and the Unity game engine for building the game, with scripts being written in the C# language. The design will have strong ties to the retrowave / synthwave genres, which essentially is lots of very typical 80s characteristics like neon lights, gridlines and so on. The idea came to me early on when I was drafting up several project proposals at the start of the summer, which has given me lots of time to research about developing a VR title with Unity. Once I had enough feedback on which project might have the greatest potential, I created the project in early August and started developing.


 

Basic Scene Setup


I began by creating an environment with a similar look and feel to some classic retrowave backgrounds I found online. This was fairly quick to set up; I created a floor and a ceiling and applied a gridline texture onto them that I found from the 'NeonSphere - Starter Pack'. I followed up by creating a deep purple colour for the skybox and added in a pink fog so that things in the distance will not be so easily visible to the player. I will explain later on what these additional elements are that can be seen in the images below.

 

VR Basic Player Controls


My first obstacle was making sure I could correctly set up the VR controls. I installed the Oculus Integration package into my project, and saw that I was presented with a choice: "OVRCameraRig" and "OVRPlayerController". Both items will get me basic VR controls set up and allow me to begin testing the game, but I wanted to find out what the difference between them was. After some researching, it seemed that the distinction was a small one; OVRCameraRig is better if the player is mostly

Unity Virtual Reality OVRCameraRig Hierarchy Setup
OVRCameraRig Hierarchy

stationary, and OVRPlayerController is better if the player is travelling a lot inside the game. Since I want my player to be in a stationary location, I added in the OVRCameraRig and voilà, the player can now play the game with their VR gear! The camera icon in the scene images represents where the player would start when loading the game.


I want to base the core gameplay off of the old arcade games where you would hold a plastic gun and use it to shoot at enemies on the screen, something like the House of the Dead arcade machines. This means that I won't need the player to have VR hands to interact with their environment; it will all be done through raycasting between a point on the guns and the UI elements that will be added later on. To do this, I created some basic guns to use as a template that I made from a couple of cubes, applied a simple texture to give them a neon look and attached them as children of the left and right hand anchors (seen in the above image next to the blue cube icons). Now, the player's hands are virtual guns - hooray!

No virtual gun worth its salt is complete without being about to fire bullets, so I created a basic bullet out of a cube, added a new script with an old school firing sound to the guns and now they can fire.


This would be nice, except for one small problem...squeezing the trigger on either controller results in both guns firing at the same time. As a quick fix, I separated the script into two for each controller and now have it working as intended. This is by no means optimal and can be easily improved, but for now it's a stable fix.


 

Enemies & Spawning Systems


Next up on the list was to add in some enemies for our player to shoot and destroy!


Since I just want a template enemy in the scene and am taking lots of inspiration from arcade games, I quickly made a 3D variant of a classic enemy out of more cubes that almost anybody can recognize:

Neon Green Enemy Space Invader 3D Cubes
Neon Green Enemy Space Invader

It seemed only fitting to add this character into the game, but for obvious IP and copyright reasons I will almost certainly be changing my enemies later in development. As of now, consider this my way of acknowledging one of the best arcade games ever. I then made a red variant so that I have 2 enemies to work with.


Neon Red Enemy Space Invader 3D Cubes
Neon Red Enemy Space Invader

Following from this, I created a new script that would manage how these enemies would spawn into the game. Since my spawn system is based off of the way cubes spawn in Beat Saber, I instantiate these enemies based on a beat that is defined in the Inspector window inside of Unity. This beat is simply the BPM of the song that I have playing in the level, and the script uses an array that contains the enemy prefab objects as well as an array with locations in which to instantiate them. On each beat, a random enemy is chosen from the array and randomly created at one of these locations, after which they move in a straight line towards the player before being destroyed after a given time.

The first image shows a still frame of the spawner in action. The space invaders will continue past the player (the camera & volume icons) for a couple of seconds before being destroyed. The second image shows what this looks like while playing the game, although this is not the best representation of what it looks like whilst you're in VR.


For the music, I originally used the FatRat's Unity as a starting point to make sure my spawner was working accurately and correctly. After I finished working on it, I began listening to music from the retrowave genre to find something that would be much more fitting for the game. Currently, I have Scandroid's Neo Tokyo (Dance With The Dead Remix) acting as the level's song, which I am very happy with. I'll be sure to demo all of this in videos in next week's blog!


With this done, I wanted to try giving the enemies more life by creating a kind of flight path that they would follow and tell my enemies when they should shoot at the player along this path. So I created a new script that controls the movement of my more sophisticated enemies, and for testing I used some basic shapes to represent the enemies. To differentiate the player's bullets from the enemies, I created a laser prefab that my enemies will fire. Video footage will come next week, but here are the images:


So far, these are semi-working. I am having some trouble getting the barrels to correctly aim at the centre eye anchor of the OVRCameraRig and will be looking to fix these in due course. In plain English, the enemies won't fire directly at you unless I manually adjust the barrel angle, which isn't ideal if I want to instantiate lots of enemies. The purple rectangle in the first image represents the barrel and will fire the laser correctly (laser shown in far right image), however removing this physical barrel (as done in the case with the cube) causes the lasers to spin off into the void and not fire in a straight line towards the player. There's a fair bit of work to be done here before I am content with my enemies shooting!


 

Closing Thoughts


If you made it this far, then first of all - well done! Second, thank you for reading through all of that! There was a lot of content I wanted to cover to show what work I have done over the course of 2 months, & I tried to condense it down as much as possible whilst making it as easy to understand as I could for anyone who may read it.


Admittedly, I haven't covered everything that I did; in fact, I left out quite a bit for fear of creating an overwhelmingly large blog post - although I may have crossed that line already! So you can be sure to see and read about a lot more in the next post, which will finish covering everything I have done up until the recent weeks. I will then go on to write about what was achieved during the week which should be much smaller blogs than this beast. I'll also look to get in video footage of the project so that you can see everything I talked about in action and break up the monotony of paragraphs of text.


With that, I thank you all for reading this, and shall see you next week :)

48 views0 comments
bottom of page