Paul Miller > Games-RolePlay-MapGen > Games::RolePlay::MapGen::Exporter::Text

Download:
Games-RolePlay-MapGen-1.5008.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Games::RolePlay::MapGen::Exporter::Text - A pure text mapgen exporter.

SYNOPSIS ^

    use Games::RolePlay::MapGen;

    my $map = new Games::RolePlay::MapGen;
    
    $map->set_exporter( "Text" );

    generate  $map;
    export    $map( "filename.txt" );

DESCRIPTION ^

This is how they'd look in a rogue-like... Unfortunately, this design won't work with a cell based map... It'll have to look more like that below.

                 #.#         #.#  
                 #.#         #.#  
    ##############+###########+#########
    ....................................
    ##############+###########+#########
               #.....#       #.#
               #.....#       #.#
               #.....#       #.#########
               #######       #..........
                             ###########

Sadly, since every cell has up to 4 exits and adjacent cells aren't necessarilly open to eachother, the text based map has to have a little more space init.

                 |.|             |.| 
                   
                 |.|             |.| 
    - - - - - - - + - - - - - - - + - - - 
    . . . . . . . . . . . . . . . . . . .
    - - - - - - - + - - - - - - - + - - - 
             |. . . . .|         |.|

             |. . . . .|         |.|
                                    - - -
             |. . . . .|         |. . . .
              - - - - -           - - - - 

Also, there's really no good visual way to show what kind of door we're looking at. I've chosen to use ANSI colors.

    brown   - a door
    red     - locked
    blue    - stuck
    magenta - locked and stuck

SEE ALSO ^

Games::RolePlay::MapGen

syntax highlighting: