Module ROT.Map.Uniform

The Uniform Map Generator.

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

Functions

init (width, height[, options[, rng={4]]) Constructor.
create (callback) Create.


Functions

init (width, height[, options[, rng={4]])
Constructor. Called with ROT.Map.Uniform: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 {4)
    • roomHeight table room minimum and maximum height (default {4)
    • 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)
  • rng userdata Userdata with a .random(self, min, max) function
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.Uniform self
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03