Games::Roguelike::Area::Wilderness
use Games::Roguelike::World; $w = new Games::Roguelike::World(w=>40, h=>20);; $a = new Games::Roguelike::Area(world=>$w, name=>'upland'); $a->generate('wilderness', {sym=>'T', color=>'green on black', weight=>2}, {sym=>'"', color=>'white on green', weight=>2}, {sym=>'~', color=>'white on blue', weight=>1}, {sym=>'*', color=>'red on black', city=>1}, city=>4 ); $w->drawmap(); $w->getch();
Area "generator" module.
Each argument to generate(...) is a terrain reference containing:
sym => symbol to use for that terrain color => color to use for that terrain
And optionally:
weight => weight of that terrain element in the generator, default 1, must be an integer ckey => elements with same numbers support each other's presence)
<L>Games::Roguelike::Area
To install Games::Roguelike::Mob, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Games::Roguelike::Mob
CPAN shell
perl -MCPAN -e shell install Games::Roguelike::Mob
For more information on module installation, please visit the detailed CPAN module installation guide.