You’re gonna want to use tiles. Try making it in 2d first, outside of unity. Since you’re not an experienced programmer I really don’t think this is gonna work, but here we go:
Make different models that fit seamlessly next to each other. A corner piece, a straight piece, a dead end… A bit like this.
Give each of your different pieces a unique ID, like this:
- Corner piece
- Straight piece
- T-junction
- Dead end
- Dead end with loot
- 4-way junction
- You get it by now…
Then make a multidimensional array, this example is static, you want to dynamicly randomly generate this.
int[,] tiles = new int[32,32];
tiles[0] = {1,2,1,2,3,1,1,2,3,1,1,2,2,3,2,1,2,3,1,3,2,2,3};
tiles[1] = {2,3,1,2,3,3,1,2,3,2,7,2,2,3,2,5,2,3,5,3,5,2,3};
tiles[2] = {3,1,2,2,3,1,4,2,3,5,1,2,3,3,2,1,2,3,1,3,2,4,3};
All the way down to 31, so that you have a 32x32 tile. (you can make it bigger ofcourse, you’re only gonna need a better algorithm then).
Look up these links for ideas and reading material:
here, and take this!
this one is not in C# (unity is) but it does explain the basics of making a tile-based game very well. Very last link you’re gonna get from me is this one, this is not about generating, nor is it about your type of game, but it has been so useful to me I had to just give you the link. The playlist is too short, there are more videos, just check his channel.