A quick example of how you could create basic random terrain for a platform or artillery type game. It uses an array to store the terrain data and the tilemap object to display it. Example is commented and covers Arrays, Tilemaps & “For” loops.
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.