Thursday, August 29, 2013

Back to School, Back to Vinyl

Summer passed in a flash, and while I was unable to work on Vinyl while doing my internship at EA, the game has come a very long way from when I last worked on it.  The track generation code I wrote with Sherly after the end of last semester is still being used to generate each song's track.  Cody has set up a lot of code to analyze and track data from the song so we know when and what to spawn based off of the music.  We have most of the core gameplay set up and working, now we just need to refine the fun and tune everything.

Today I jumped right into the code and fixed the two of the largest bugs that had been plaguing the game for a while.  The first was an issue with the track where the half pipe would be created incorrectly with a roof on top of it. Initially it would seem like an issue with the track generation code, but it only happened on certain songs and not all of them.  Additionally, while travelling through this makeshift tunnel the camera would freak out for a split second, which didn't match up with the mesh having a problem.  Because of all this my initial suspicion was a problem with the spline data that we use to generate the mesh, and not the actual mesh itself.  After digging into the code a bit this turned out to be exactly what was wrong and it was an easy fix to adjust the spline.

The second bug was a larger issue, where after starting up the game it would soft lock.  We knew that this was happening because Unity and PD were failing to connect.  Unity was listening for the connection from PD, but the signal was being requested before PD had finished loading up.  To fix this I made it so that instead of sending one signal we send several attempts if we fail in addition to giving a timeout to the connection attempt so there's a window we're sending the signal in instead of a split second.  Now in the case of it failing, which has gone from almost always to never so far, the game won't soft lock although it will play incorrectly.  The next step is to take care of that fail case in some manner.

Here's the updated look of the game: