A Unity package for generating random maps. This tool is designed to create hundreds of randomly generated maps for games with async calls and
- Multithreaded Map Generation: Generate maps using multiple threads to optimize performance for large-scale map generation.
- Configurable Parameters: Customize map size, tile types, and seed for generation to create diverse environments.
- Serializable Parameter Objects: Can save paramaters in an object to use later
- Dynamic Algorithm Stack: Customize which algorithms you want to run in which order
- Visualizer Compatibility: Works with a random generator visualizer that will eventually export parameter files for use in unity projects, this visualizer also has a built-in testing framework
- Texture Rendering: Support for exporting multiple tilemaps into a texture.
- Event System: Support for events that run on different outcomes of the generation, such as finish or error
- Clone this repository or download the zip file.
- Add the package to your Unity project by copying the
RandomGeneratorfolder into yourPackagesdirectory. - Open Unity and go to Assets > Import Package > Custom Package to import it into your project.
- Add the
RandomGeneratorcomponent to any GameObject in your scene. - Set your map dimensions, stack of generator algorithms, tile database objects, and layer database objects in the Inspector (The databases come with a default tileset and layer info set)
- Make a tilemap creator object (that has grid component as well) this will instantiate the tilemaps as children if not predefined
- Call
Generate()from a script or set it to auto-generate in the editor.
using UnityEngine;
using Dalichrome.RandomGenerator;
public class Example : MonoBehaviour
{
public RandomGenerator randomGenerator;
void Start()
{
randomGenerator.Generate();
}
}