Tuesday 4 February 2014

How we are generating our track

Vinyl had a code-generated spiral track for most of development. At the beginning of this semester, we decided to try multiple track styles. There were two ways we could do it:
1. procedural generation
2. algorithm generation
Whatever we decided to use, we wanted the track to be interesting and not as boring as the spiral track.


In our current architecture, we create spiral spline data for the track when we read the audio file. Why did we do it on reading the audio file? Of course, it is to make sure the length of the track matches the audio. Then in the game, we programmatically create the vertices and indices on the spline. Basically, we don't want to change the current architecture. We just want to change the way we generate the spline data. So, either way will work perfectly with our current structure.

First, procedural generation. This... frankly, we have no idea yet how to do it. We can just use a simple cosine or sinus function but that could be so repetitive. So... next: algorithm generation! We knew we could easily use mathematical functions but which ones? After Googling around, we found this website that listed all of the Famous Curves Indices. We came to like the Lissajous and Rhodonea curves. Then then next step was to create different curves using these two basic functions. We tested our mathematical functions using FooPlot and came up with these 10 different tracks.

New tracks

Having 10 basic tracks, we then randomly pick a track for the song based on the length of the song and the difficulty of the song. That's how we 'assign' the track for each song.

No comments:

Post a Comment