Module ROT.Map.Brogue

The Brogue Map Generator.

Based on the description of Brogues level generation at http://brogue.wikia.com/wiki/Level_Generation

Functions

init (width, height[, options]) Constructor.
create (callback, firstFloorBehavior) Create.


Functions

init (width, height[, options])
Constructor. Called with ROT.Map.Brogue:new(). A note: Brogue's map is 79x29. Consider using those dimensions for Display if you're looking to build a brogue-like.

Parameters:

  • width int Width in cells of the map
  • height int Height in cells of the map
  • options Options
    • roomWidth table Room width for rectangle one of cross rooms (default {4)
    • roomHeight table Room height for rectangle one of cross rooms (default {3)
    • crossWidth table Room width for rectangle two of cross rooms (default {3)
    • crossHeight table Room height for rectangle two of cross rooms (default {2)
    • corridorWidth table Length of east-west corridors (default {3)
    • corridorHeight table Length of north-south corridors (default {2)
create (callback, firstFloorBehavior)
Create. Creates a map.

Parameters:

  • callback This function will be called for every cell. It must accept the following parameters:
    • x int The x-position of a cell in the map
    • y int The y-position of a cell in the map
    • value int A value representing the cell-type. 0==floor, 1==wall, 2==door
  • firstFloorBehavior boolean If true will put an upside T (9x10v and 20x4h) at the bottom center of the map.

Returns:

    ROT.Map.Brogue self
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03