Grid of Rooms Generation: Difference between revisions

From PMDOWiki
Imbion (talk | contribs)
Created page with "'''Grid of Rooms Generation''', known internally as <code>GridFloorGen</code>, is a type of FloorGen. It generates by first creating a grid of rooms. Then, it plans out their dimensions, filling in the tile details. == Generation Process == {| class="wikitable" |- ! Image !! Step Description |- | frameless || InitGridPlanStep initializes a grid of cells. |- | frameless ||..."
 
Imbion (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Grid of Rooms Generation''', known internally as <code>GridFloorGen</code>, is a type of [[FloorGen]]. It generates by first creating a grid of rooms. Then, it plans out their dimensions, filling in the tile details.
'''Grid of Rooms Generation''', known internally as <code>GridFloorGen</code>, is a type of [[FloorGen]]. It generates by first creating a grid of rooms. Then, it plans out their dimensions, filling in the tile details.
== Usage ==
Grid of Rooms is the most common approach to dungeon generation. It works similar to [[List of Rooms Generation]], but uses a pre-applied grid to structure itself. There are multiple unique templates available in PMDO for floor shape.
== Generation Process ==
== Generation Process ==
{| class="wikitable"
{| class="wikitable"
Line 7: Line 10:
| [[File:FloorGen_Grid_Cells.png|frameless]] || [[Init Grid Plan Step|InitGridPlanStep]] initializes a grid of cells.
| [[File:FloorGen_Grid_Cells.png|frameless]] || [[Init Grid Plan Step|InitGridPlanStep]] initializes a grid of cells.
|-
|-
| [[File:FloorGen_Grid_Cells_Chosen.png|frameless]] || Next, a path generator, such as [[Path Branch Steps|GridPathBranch]], is used to place rooms (blue) in the grid, with connecting halls (yellow) between them.<br>Each room and hall filled here is also assigned an algorithm.
| [[File:FloorGen_Grid_Cells_Chosen.png|frameless]] || Next, a path generator, such as [[Grid Path Steps|GridPathBranch]], is used to place rooms (blue) in the grid, with connecting halls (yellow) between them.<br>Each room and hall filled here is also assigned an algorithm.
|-
|-
| ||Then, [[Draw Grid To Floor Step|DrawGridTOFloorStep]] translates the grid rooms and connectors into a list of rooms and halls.<br>
| ||Then, [[Draw Grid To Floor Step|DrawGridTOFloorStep]] translates the grid rooms and connectors into a list of rooms and halls.<br>

Latest revision as of 20:13, 10 August 2025

Grid of Rooms Generation, known internally as GridFloorGen, is a type of FloorGen. It generates by first creating a grid of rooms. Then, it plans out their dimensions, filling in the tile details.

Usage

Grid of Rooms is the most common approach to dungeon generation. It works similar to List of Rooms Generation, but uses a pre-applied grid to structure itself. There are multiple unique templates available in PMDO for floor shape.

Generation Process

Image Step Description
InitGridPlanStep initializes a grid of cells.
Next, a path generator, such as GridPathBranch, is used to place rooms (blue) in the grid, with connecting halls (yellow) between them.
Each room and hall filled here is also assigned an algorithm.
Then, DrawGridTOFloorStep translates the grid rooms and connectors into a list of rooms and halls.
First, each room algorithm chooses the room size and location.
Next, the rooms signal what connections they require to their halls. Their size is chosen.
Finally, a list of rooms and halls is written.
The list of rooms and halls are then translated into tiles using DrawFloorToTileStep.
Each room generates its tiles.
Then, the hall algorithm generates.
All the floor tiles are now generated successfully.
Finally, using FloorStairsStep, the start and end tiles are marked.
First, two separate rooms (pink) are selected. Then, a tile (purple) is selected to place the marker.