Skip to content
A Unity implementation of a level generator based on one or more agents moving in a grid.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Screenshots
Scripts
.gitignore
1vs10.gif
1vs10_2.gif
AgentBasedLevelGenerator_Tutorial.zip
AgentBasedLevelGenerator_Tutorial_Solution.zip
AgentBasedTwoLayerLevelGeneration.unitypackage
LICENSE
LevelGeneratorAgent.unitypackage
README.md

README.md

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.

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

You can’t perform that action at this time.