top of page
Search

Procedural Track Generation

This week I added procedural generation to the game!


To do this I first created some basic building blocks that I could build the level out of, and then went about a creation script.


The script works by first placing the starting block of the level, then it picks a random tile from the regular blocks list that it holds, these blocks are without any traps on and are mainly there to give a safe space for the runners, as well as add variation to the course layout.


After the regular tile it picks a trap tile, these tiles have different layout of traps on them, but will always have a trap.


The script will alternate between these two tile types until it reaches the maximum track length variable, where it will finish by placing a finish tile.


Each building block will need a start position and an end position marker in their child hierarchy, this is so that the building script will know where to place each block after the other.

 
 
 

Recent Posts

See All

Comments


bottom of page