ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
|
This package provides components for interfacing the ManiaMap procedural layout generator with Unity.
To add the package to a project, in Unity, select Window > Package Manager
.
Select Add package from git URL...
and paste the following URL:
RECOMMENDED: To lock into a specific version, append #{VERSION_TAG}
to the end of the URL. For example:
The following subsections outline how to procedurally generate a layout.
The generator creates rooms by pulling from user-defined rooms. To the generator a room is essentially a collection of cells in a grid, with information, such as door connections, assigned to them.
Room
by selecting GameObject > Mania Map > Room
. Create a prefab for this Game Object that may be utilized later.Update Room
button to generate the cells.Is Empty
flag in the inspector. The cell Gizmos will show crossed out for empty cells.Door
by selecting the Room Game Object then GameObject > Mania Map > Door
. The door should be added as a child of the room.Auto Assign
button. Note that the Update Room
button on the Room component will also perform this operation on all doors in the room.CollectableSpot
by selecting the Room Game Object then GameObject > Mania Map > Collectable Spot
. The collectable spot should be added as a child of the room.Assets > Mania Map > CollectableGroup
).Auto Assign
button. Note that the Update Room
button on the Room component will also perform this operation on all collectable spots in the room.Mania Map > Batch Save Templates
from the menu to save room templates for all room prefabs discovered within the project. Note that the settings for this action may be configured in the settings at Resources/ManiaMap/TemplateSaveSettings
once the action has been run once.TemplateGroup
by selecting Assets > Mania Map > Template Group
.LayoutGraph
by selecting Assets > Mania Map > Layout Graph
.Add Node
.Add Edge
, then selecting another node.View > Toggle Edge Display
is enabled, then select the edges in the graph area.GenerationPipeline
by selecting GameObject > Mania Map > Generation Pipeline
.<Inputs>
Game Object and add any layout graphs and collectable groups you wish to associate with the generator to the inputs.Run
method from a script.