This is the library version of the Procedural Noise Algorithms for Haxe project that was first submitted for PROCJAM 2014.
It's now renamed to MAN-Haxe, an acronym meaning Mazes And Noises.
Try out the sample here: Demo
Using the library should be as easy as including classes in your project. You can either clone the repo and reference them, copy the folder into your project or reference them from haxelib.
Each class has a generateIntMatrix, generateMatrixString and a ConvertMatrixToString static function, and Noise classes should also have a generateFloatMatrix function as well.
The Generate Int/Float Matrix functions will return a 2D array (e.g. Array*<Array<Int>>*) of numbers, floats will be between 0 and 1 while int will be between 0 and NumOctaves-1.
The Generate String functions will return a multi-line string separated by commas. The values will be in the same format as the Generate Int, with exceptions to the Maze class which have the specific values:
- 0 - Empty Spaces
- 1 - Walls
- 2 - Start Point
- 3 - End Point
The following resources detail the algorithms used:
Value Noise
Worley Noise
Midpoint Displacement
- https://code.google.com/p/fractalterraingeneration/wiki/Midpoint_Displacement
- http://stackoverflow.com/questions/26877634/midpoint-displacement-2d-algorithm-producing-unusual-patterns
Prim's Algorithm