Skip to content

Roads !

Compare
Choose a tag to compare
@matthewstyler matthewstyler released this 08 Aug 18:44
· 42 commits to main since this release

Roads can be generated through the maps randomly or through a list of coordinates.

Roads can be generated by providing a positive integer to the roads= argument. Roads are randomly seeded to begin and start at an axis (but not the same axis).

A* pathfinding is used to generate the roads with a heuristic that uses manhattan distance, favours existing roads and similar elevations in adjacent tiles.

Roads can be configured to include/exclude generating paths thorugh water, mountains and flora.

Tiles containing roads are of type road, those without are of type terrain.

The --roads_to_make option allows you to specify multiple pairs of coordinates to attempt to build paths, subject to the heuristic and other option constraints. Expects a a single list, but must be sets of 4, example of two roads: --roads_to_make=0,0,50,50,0,0,75,75