Skip to content
A set of Maze and Noise algorithm classes that can generate 2D array or string maps.
Haxe
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
man
sample
.gitattributes
.gitignore
LICENSE
MAN-Haxe.hxproj
README.md
application.xml
haxelib.json

README.md

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

You can’t perform that action at this time.