Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

AgentBasedLevelGenerator

A Unity implementation of a procedural level generator based on one or more agents moving in a grid. If there are one or more agents creating the level, a simple Depth-First Search is performed to check whether the level is connected and a simple corridor is generated between the agents if necessary. The size of the map, the sizes and probabilities of the rooms and whether or not rooms can overlap are all changeable parameters of the algorithm (part of the MultiAgentDigger prefab). The generator also automatically builds a navmesh of the generated map. New maps can be generated (with different parameters if you wish) while the scene is running.

Tutorial

For the Institute of Digital Games at the University of Malta, I created a tutorial in which students need to fill in the most important parts of the code. The tutorial can be found here: link. The solution can be found here: link and is probably better documented than the main code in this repo. Sorry for that.

Hierarchical Generator

A more elaborate generator, used for creating the data set of my PhD thesis can be found here: link. This generator assures that there are two paths between the two bases and has two walkable floor levels. For more information, check out my personal website

ASCI Map

The solution to the tutorial contains code for exporting the map to a csv-file of ASCI characters (basically 0,1 and 2 for the different floor levels).

Screenshots

Gif 1v10

Gif 1vs10

Screenshot 1

Screenshot 2

Screenshot 3

Minimap

The code creates a render of the level as a minimap It has a minimap!

Navmesh

The navmesh is automatically generated based on: https://github.com/Unity-Technologies/NavMeshComponents NavMesh

About

A Unity implementation of a level generator based on one or more agents moving in a grid.

Resources

License

Releases

No releases published

Packages

No packages published

Languages