All Projects → gamepopper → Man Haxe

gamepopper / Man Haxe

Licence: mit
A set of Maze and Noise algorithm classes that can generate 2D array or string maps.

Programming Languages

haxe
709 projects

MAN-Haxe

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

alt-text

How to use the library

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

References

The following resources detail the algorithms used:

Value Noise

Worley Noise

Midpoint Displacement

Prim's Algorithm

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].