Module ROT.Map.Rogue

Rogue Map Generator.

A map generator based on the original Rogue map gen algorithm See http://kuoi.com/~kamikaze/GameDesign/art07_rogue_dungeon.php

Functions

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


Functions

init (width, height[, options])
Constructor.

Parameters:

  • width int Width in cells of the map
  • height int Height in cells of the map
  • options Options
    • cellWidth int Number of cells to create on the horizontal (number of rooms horizontally)
    • cellHeight int Number of cells to create on the vertical (number of rooms vertically)
    • roomWidth int Room min and max width
    • roomHeight int Room min and max height
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.Cellular or nil self or nil if time limit is reached
generated by LDoc 1.4.6 Last updated 2017-07-19 18:43:03