/chiseled-random-paths

Generates random tile-based paths with a simple novel algorithm

Primary LanguageTypeScriptMIT LicenseMIT

Chiseled Random Paths

This code generates a random path between a given set of points. Unlike most random path routines, the paths can organically wiggle back and forther.

An explanation and demo can be found at https://www.boristhebrave.com/2022/03/20/chiseled-paths-revisited/.

The algorithm has gone through several iteratios, you can find some older versions in chisel_v0.ts.

Usage

See the usage in demo.ts, or the comments. The function of interest is randomPath, which find a path connecting specific points.

Copyright

Code is covered by the MIT license.

The images are provided by fictionaldogs on the ZFGC forums. http://zfgc.com/forum/index.php?topic=41500.0 "If anybody wants to use anything, feel free to do so (with credit given if it is made outside of zfgc.com of course)."