Level Generation

John M. Quick · 2015

In the preceding challenge, we created a MapSpawn script to handle spawning objects on our tile map . While the script is nicely composed to spawn a single object without any overlapping positions, our game levels likely want to include many different objects . For instance, we may want to add things like heroes, collectables, obstacles, doors, and so on, to our map . Fortunately, our MapSpawn script works with any type of tile prefab . Therefore, we can add a new MapSpawn for each type of object we want to spawn . Unfortunately, our various MapSpawn scripts are completely independent and unaware of one another . Hence, they cannot coordinate to ensure that their tiles do not overlap, among other things . Thus, it is time to think about how we will organize all of the individual pieces that compose our map . In this challenge, we will introduce a script that is responsible for managing all of the spawned objects in our game world .

Read the paper · More papers on PaperTik