Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Writing a random dungeon generator in perl.

by displeaser (Hermit)
on Aug 16, 2005 at 10:05 UTC ( #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


Comment on Re: Writing a random dungeon generator in perl.
Select or Download Code
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
Node Status?
node history
Node Type: note [id://484114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-08-31 00:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls