Module mapgen::metric

source ·
Expand description

Different metrics for the map Can be used to meausre the quality of the map or the quality of the generator. To meause the quality of the generator; generate lots of maps, measure them and the provide generator score as an average.

Functions

This metric calculates the percentage of walkable cells (Floor). If this number is very low (like < 10%) then it means that the map is probably to degenerated and shouldn’t be used
Calculate the length of the shortes path from the starting point to the exit. If this path is very short, then the map is probably degenerated.