Module ROT.Map.Digger

The Digger Map Generator.

See http://www.roguebasin.roguelikedevelopment.org/index.php?title=Dungeon-Building_Algorithm.

Functions

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


Functions

init (width, height[, options])
Constructor. Called with ROT.Map.Digger:new()

Parameters:

  • width int Width in cells of the map
  • height int Height in cells of the map
  • options Options
    • roomWidth table room minimum and maximum width (default {3)
    • roomHeight table room minimum and maximum height (default {3)
    • corridorLength table corridor minimum and maximum length (default {3)
    • dugPercentage number we stop after this percentage of level area has been dug out (default 0.2)
    • timeLimit int stop after this much time has passed (msec) (default 1000)
    • nocorridorsmode boolean If true, do not use corridors to generate this map (default false)
create (callback)
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

Returns:

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