How to create a random generated racing game track with walls on the side?

Hello there!

I am creating a racing game with AI trained with Unity machine learning agents toolkit. The agents work well on three tracks I have created, now I would like to try the agent on a random track, generated by an algorithm. Without entering in details of the neural network part let’s say I need to have a track with walls on the side (that’s essential), turns, and narrow parts.

This is one track I created manually

169355-track3.png


The perfect fit would be a deformation alongside a random generated closed curve of this object

169356-trackp.png


I found this asset, that’s very good but it doesn’t have walls on the side.

Ian Hudson’s Race Track Generator

This also could be a good asset but without walls on the side again

Sebastian League’s Bézier Path Creator

Do you have any suggestions, tutorials, or assets to give me?

Maybe it’s not the thing you’re looking for, but if you create a tile of track pieces you can then use the “wave function collapse” to generate new track.