Namespace GoRogue.MapGeneration.Steps
Namespaces
GoRogue.MapGeneration.Steps.Translation
Classes
AreaFinder
Finds the distinct areas in the boolean grid view specified, and adds them to the item list with the tag specified.
CellularAutomataAreaGeneration
Uses a cellular automata smoothing algorithm to smooth areas on the given map.
ClosestMapAreaConnection
Connects areas of the map by connecting each area to its closest neighboring area, with distance between areas based on the connection point selector specified. Context Components Required:
Component | Default Tag |
---|---|
ItemList<TItem> | "Areas" |
ISettableGridView<T> where T is bool | "WallFloor" |
Component | Default Tag |
---|---|
ItemList<TItem> | "Tunnels" |
DoorFinder
Finds the locations of open walls in rectangular rooms that constitute doorways.
MazeGeneration
Generates a maze in the wall areas of a map, using crawlers that walk the map carving tunnels. Context Components Required:
- None Context Components Added/Used:
Component | Default Tag |
---|---|
ItemList<TItem> | "Tunnels" |
ISettableGridView<T> where T is bool | "WallFloor" |
OrderedMapAreaConnection
Connects areas of the map by connecting each area specified to a random other area, or connecting the areas in a specific order specified.
RandomViewFill
Randomly fills a boolean IGridView<T> with true/false values. Creates a grid view with the given tag if none is present.
RectangleGenerator
Produces a very simple map that is entirely floor, with a single-thick outline of walls around the outside.
Context Components Required:
- None Context Components Added/Used:
Component | Default Tag |
---|---|
ISettableGridView<T> where T is bool | "WallFloor" |
An existing wall-floor component used if one is present; if not, a new one is added.
RoomDoorConnection
Selects and opens walls of rectangular rooms to connect them to adjacent open spaces (typically mazes/tunnels). Components Required:
Component | Default Tag |
---|---|
ItemList<TItem> | "Rooms" |
ISettableGridView<T> where T is bool | "WallFloor" |
Component | Default Tag |
---|---|
DoorList | "Doors" |
RoomsGeneration
Carves out non-overlapping rooms in a map. Rooms generated will not overlap with themselves, or any existing open areas in the map.
Context Components Required: None
Context Components Added/Used:
Component | Default Tag | Description |
---|---|---|
ItemList<Rectangle> | "Rooms" | A list of Rectangle instances which denote the rooms that were created. |
ISettableGridView<bool> | "WallFloor" | A grid view of boolean values the size of the map where "true" indicates a tile is passable, and "false" indicates it is not. |
In the case of both components, existing components are used if they are present; new ones are added if not.
TunnelDeadEndTrimming
Searches for tunnels that don't lead anywhere (eg. are surrounded by 3 walls), and removes them from the map. Context Components Required:
Component | Default Tag |
---|---|
ItemList<TItem> | "Tunnels" |
ISettableGridView<T> where T is bool | "WallFloor" |