We are ready to start working on the level generator’s scene itself.
Create a new 2D scene and rename the root node to RandomWalker. Save it as RandomWalker.tscn
.
Add the following nodes:
tileset-prototype.tres
to Tile Set in the Inspector.Rename the TileMap node to Level. Like before, make sure to also alter the x and y values of the Cell > Size to 60 pixels to match our assets.
Select the Timer node and, in the Inspector, toggle on its Autostart property. That way, we don’t have to start the timer from the code manually. You can change the Wait Time property to control the time interval between each step in the map-generation process. Using a timer gives us a rudimentary tool for debugging. It also adds a build-up animation effect to showcase our algorithm.
Now, we are ready to code the RandomWalker, which we are going to do in the next lesson.