Random Map Generation

This package is built to take in a custom tileset of either 2D or 3D tiles and use them to create a random branching map. I am making this package to primarily fulfill my own needs for a map generator, but I am still trying to implement as many recommendations from my fellow classmates as possible.

What I worked on:

The generator

The generator takes in the given tileset and can either generate the whole map during start. Or to prevent halting the game while generating it also supports generating in a coroutine (see gif).

The generator will attempt to place rooms and slowly spread out until it meets all the conditions set by the provided settings asset. For example, if the map does not contain enough of the “required” rooms then it will not consider itself valid and will continue generating until a valid map is produced. The generator will always try to reach the set maximum tile count but will not require it as long as the current tile count is in between the set min and max.

Custom Editor Window

Since one of the goals of this project was to make the system as easy to implement as possible I created a custom editor window to provide an easy place to set the settings for a tileset.

In this window, the user can set the rules the generator will use when generating, like the max tile overlap and tile counts. They can also set how often a tile should spawn.

Custom Asset

This system utilizes a custom asset to provide the option to have multiple tile sets that the game can use for different environments/levels

Previous
Previous

Artemis Reigns

Next
Next

Hockey at Pacific Science Center