Inspark VR Race
Updated 5 months ago
Windows; Oculus Rift
Futuristic race game where you use a hover car and compete against three other players for the first place.
Inspark is a virtual reality park in Mexico City, this is the third game I've worked on for this place.
For this game I was responsible for the gameplay. I made a simple lap system which included the rankings of the race, collaborated with the car movement, programming the input and output for the Logitech Wheel and some failsafes if anything happens during the race.
We used photon to sync the players.
The 3D artist used Houdini for the track and environment so I asked for some empty game objects on the track at the center so I could use them for my lap system. This game objects (I'll be calling them waypoints form now on) were divided into groups and the first one contained a trigger which set the new group to be used (this one I called it Checkpoint). So each checkpoint had all the waypoints in the group as those where used to determine where the user was in the track. I used an equation from the Minimum Distance Classifier to determine which waypoint was the closest to the player and with this I determined which player was at first, second and so on.
This waypoints also served to other purposes. With this I detected if the car was going the wrong way so we could tell the player that and also used as a way to respawn the player if for some reason he fell to the void by searching for the closest waypoint and rotating accordingly the player so it's facing the right way.
I made a tool to help me setup this waypoints using Odin Window. In this window I had a list of waypoints, then I would tell how many checkpoints I wanted and last how to distribute the groups, the window used some handlers to show in the scene what waypoints were targeted with a red wired box and if it was a checkpoint with a green wired box to see visually how they were distributed. This was important since the track had some shortcuts so I would put a checkpoint conveniently before the division. Also this proved useful since the track went through several changes and each time I needed to setup this waypoints. With this the only thing that needed manual configuration was the triggers so the players would go through them.
The car itself used a PI controller to float over the track, the acceleration was made using Unity Physics, the input was a Logitech wheel but if no wheel was detected the keyboard would be used, this served during development since not everyone could use the wheel. The wheel had some force applied to it and vibrates when the car crashes into something. I used the Logitech SDK for this. The wheel rotation could be seen in the car using the input received from the wheel.
The car also could have a boost from items or surfaces on the floor, each one had different VFX and SFX so I used Unity Events to activate them accordingly. There are also effects for the car moving and crashing, all of them were synched using Photon RPC's.
For the car SFX's I had an idle and moving. I blend them together according to speed and after certain threshold the moving SFX pitch would increment until a max speed. This pitch increase was made using some Animation Curves to have more control over how it increases.
Omar Rodríguez Pérez
Computer Engineer - Programmer
Supported Platforms
Windows; Oculus Rift