Dungeon Generation

Moderator
Posts: 682
Joined: 2002.11
Post: #1
I want to generate a dungeon like Nethack does. Any suggestions?

I might just look at the Nethack code, but I'd like to come here first.

My web site - Games, music, Python stuff
Quote this message in a reply
Hog
Member
Posts: 151
Joined: 2002.09
Post: #2
maybe you can find something useful there:

http://www.roguelikedevelopment.org/php/...tegory=MAP
Quote this message in a reply
Diplomtennis
Unregistered
 
Post: #3
...just stumbled across a bunch of source code titled "random maze generator":
http://www.gamedev.net/reference/article...le1637.asp
hope it helps D.
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #4
OK, so those links helped me a bit, but I ended up doing something completely different. I'm going to have a number of "layouts" (right now i've only got one) that divide the map into areas. Each area will have a randomly sized room in it and the rooms will be connected randomly with hallways. Right now I'm trying to get hallways to work because my pathfinder isn't working right (I'm using it to generate the hallways). Or rather, the pathfinder is fine, but something is ignoring the walls...never mind.

My web site - Games, music, Python stuff
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #5
Everything is now working perfectly. Diplomtennis, I thank you forever for that link. Even though it didn't help me with this it gave me some excellent AI ideas.

*Points to Rogue thread in WiP*

If you want the source, email me.

My web site - Games, music, Python stuff
Quote this message in a reply
Moderator
Posts: 529
Joined: 2003.03
Post: #6
Best make sure it doesn't make rooms with no hallways...unless you are using teleporters.
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #7
*points to Rogue thread in WiP again*

My web site - Games, music, Python stuff
Quote this message in a reply
Diplomtennis
Unregistered
 
Post: #8
glad I could help you. I did some metal basic pathfinding some time ago. its not excactly A*, but it did work ok for me. If you want it is still online and you can download it at: http://home.arcor.de/diplomtennis/pfadfinder.sit
Quote this message in a reply
Moderator
Posts: 682
Joined: 2002.11
Post: #9
Yeah, I've seen it. Except the source was largely in German so I couldn't comprehend it.

My web site - Games, music, Python stuff
Quote this message in a reply
Diplomtennis
Unregistered
 
Post: #10
Shock doh. you´re right - I haven´t noticed. sorry.
Its written to behave like one of those toys that bump into a wall and then turning into a new direction:

get target direction;
while (field blocked) {
turn left or right
check field
}

by checking the field i made the unit remember its path. This makes the unit to also get out of U-shaped obstacles, because it is not turning around and moving the same path again and again.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Automatic Level Generation hams 12 4,328 Jul 1, 2003 05:45 PM
Last Post: nickdabner