Class engine.Heightmap
Heightmap fractal generator
This can be used to create rooms, levels, world maps, whatever
Methods
engine.Heightmap:init (w, h[, roughness=1.2], start)
Creates the fractal generator for the specified heightmap size
engine.Heightmap:generate ()
Actually creates the heightmap
engine.Heightmap:displayDebug ([symbs="abcdefghijklmnopqrstwxyzABCDEFGHIJKLMNOPQRSTWXYZ"])
heightmap as symbols
Methods
- engine.Heightmap:init (w, h[, roughness=1.2], start)
-
Creates the fractal generator for the specified heightmap size
Parameters:
- w number width
- h number height
- roughness number how rough (default 1.2)
- start optional table
- engine.Heightmap:generate ()
-
Actually creates the heightmap
Returns:
-
table
- engine.Heightmap:displayDebug ([symbs="abcdefghijklmnopqrstwxyzABCDEFGHIJKLMNOPQRSTWXYZ"])
-
heightmap as symbols
Parameters:
- symbs string (default "abcdefghijklmnopqrstwxyzABCDEFGHIJKLMNOPQRSTWXYZ")