Games::Roguelike::Area::Wilderness - Games::Roguelike::Area::Wilderness documentation


Roguelike-Utils documentation  | view source Contained in the Roguelike-Utils distribution.

Index


NAME

Top

 Games::Roguelike::Area::Wilderness

SYNOPSIS

Top

 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();

DESCRIPTION

Top

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)

SEE ALSO

Top

<L>Games::Roguelike::Area


Roguelike-Utils documentation  | view source Contained in the Roguelike-Utils distribution.