An example of how you can simply create a randomly generated dungeon/cave for your games. The example uses a “digging” approach to create the dungeon. It stores the dungeon data in an Array and tiles it using the “Tilemap” object. It’s a nice start to adding a procedurally generated level to your game and can be easily expanded upon.
I will try this for a game idea that I have! thanks!
Fantastic. THANKS for code comments. You rock.
How would you select layouts randomly at the start of every game? Say that you have Layouts 1 – 10 and you don’t want Layout 1 to be the first one every time a game is started.