Hi, I'm pretty knew to programming and unity, but I was wondering if anyone can link me some reading material on how to randomly generate levels in unity. I eventually want to make a game where you get random missions, then walk into a portal and it takes you to a randomly generated dungeon with a boss at the end and chests loot, and enemies all the way in between. I don't plan on doing this anytime soon but would like to start reading up on it so some links on this subject would be very appreciated. Thanks.
Try doing the same in 2d first. Level generation can be pretty tough, especially when you're new to programming.
You're probably going to want to do this tile-based. Make a grid of like 32x32 trough arrays. In a modelling program make different tiles, corner pieces, walls, etc etc. Then write a program that generates the dungeon and fills those arrays. You surely remember these kind of games from your childhood: Tile based 2d game this is exactly what you're going to want to do in 3d. The pipe would be an open area (where the player can walk) and the white would be walls.
Number your different pieces. Like:
corner piece - 1,
then generate the 2dimentional array:
of course you don't want this to be static, you want it to be dynamically generated.
Have fun with it... you said you weren't an experienced programmer...
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:
Then make a multidimensional array, this example is static, you want to dynamicly randomly generate this.
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.