Game::TextMapper::Smale - generate fantasy wilderness maps
my $text = Game::TextMapper::Smale->new ->generate_map($width, $height, $bw);
This generates a wilderness map based on the algorithm by Erin D. Smale. See the blog posts at http://www.welshpiper.com/hex-based-campaign-design-part-1/ and http://www.welshpiper.com/hex-based-campaign-design-part-2/ for more information.
Generally speaking, the idea is that the algorithm picks a random terrain for a hex in the middle of the map. Based on that, the surrounding hexes a bit further away are picked, and finally the remaining hexes are picked. This is why the maps vary so drastically in terrain distribution.
Note that this module acts as a class with the generate_map method, but none of the other subroutines defined are actual methods. They don't take a $self argument.
generate_map
$self
WIDTH and HEIGHT default to 20×10.
BW stands for "black & white", i.e. a true value skips background colours.
Erin D. Smale described this algorithm in two famous blog posts: http://www.welshpiper.com/hex-based-campaign-design-part-1/ and http://www.welshpiper.com/hex-based-campaign-design-part-2/.
The map itself uses the Gnomeyland icons by Gregory B. MacKenzie. These are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/.
To install Game::TextMapper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Game::TextMapper
CPAN shell
perl -MCPAN -e shell install Game::TextMapper
For more information on module installation, please visit the detailed CPAN module installation guide.