Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Writing a random dungeon generator in perl.

by displeaser (Hermit)
on Aug 16, 2005 at 10:05 UTC ( [id://484114]=note: print w/replies, xml ) Need Help??


in reply to Writing a random dungeon generator in perl.

Hi,
for some ideas on how to do things, have a look at the following site: http://roguelikedevelopment.org/development/.

It contains lots of articles on many different aspects of rogulike development. some of it is c++ based but the ideas still stand.

Also I'd second XDG's comment about placing the increment in brackets.

Instead of
elsif ($dungeon[$start] eq '#' && $dungeon[$start] + 1 eq '#'

try
elsif ($dungeon[$start] eq '#' && $dungeon[$start+1] eq '#'


Also see cpan for some modules you might find handy,
Games-Lineofsight
Games-Maze
Games-Dice


Hope this helps.
Displeaser

Replies are listed 'Best First'.
Re^2: Writing a random dungeon generator in perl.
by extremely (Priest) on Aug 16, 2005 at 14:23 UTC
    Let me add Games::Dice::Probability as another handy bit of code... written by a friend of mine.

    --
    $you = new YOU;
    honk() if $you->love(perl)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://484114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 05:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found