Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.09 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.09 KB

MapMaker

AppVeyor Builds

Algorithms

Heightmaps

You can use class DiamondSquare like in example:

var sizePower = 3; //result size = pow(2, sizePower) + 1
var persistence = 1.1;
var config = new DiamondSquareConfig(sizePower, persistence /*optional*/);
var generator = new DiamondSquare(config);

float[,] heights = generator.Generate();

You can also use an asynchronous call:

float[,] heightsTask = await generator.GenerateAsync();

Noise

You can use class Noise:

var size = 1000;
var persistence = 0.67; //best results between 0.5 and 0.8
var config = new NoiseConfig(sizePower, persistence);
var generator = new Noise(config);

float[,] heights = generator.Generate();
//or
Task<float[,]> heights = generator.GenerateAsync();