NAME
Game::TextMapper::Smale - generate fantasy wilderness maps
SYNOPSIS
my $text = Game::TextMapper::Smale->new
->generate_map($width, $height, $bw);
DESCRIPTION
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.
METHODS
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 WIDTH, HEIGHT, BW
WIDTH and HEIGHT default to 20×10.
BW stands for "black & white", i.e. a true value skips background colours.
SEE ALSO
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/.