Procedural race track generation
January 30th, 2015
Having gotten our hovering mechanics to a pretty good state, we’ve made the switch to working on procedural track generation. Dana has created a sizable handful of different terrain pieces and different player interactions. We’re going for a good variety of play experiences including:
- accelerate while turning around wide corners
- high intensity strafing
- hairpin turns – cut acceleration while drifting and reorient craft
- long chill straight stretches
- precarious bridges
- hazardous tunnels
- ramps and jumps
Each terrain piece has a start and end opening that is one of four sizes. A small marker tells unity where these opening are so that they can be lined up. The generator cycles through pieces and chooses randomly from a subset of pieces that have the correct opening size. The generator also needs to keep track of things like pieces already used (so we don’t have repeats in a given track) and kinds of pieces used.
There are also some challenges with the track running into itself, which we may be able to tackle by turning the loading and needed. We’ll also need to get the connections between tracks as seamless as possible which may take some tweaking in blender as well as adjusting how the connections are made.
There’s certainly more to do, but we’re excited to have a version of our procedural tracks working.