Random dungeon generation

This topic is 4160 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

That's the phrase I used on Google. It gave me a lot of good results. I like this one: http://www.aarg.net/~minam/dungeon_design.html However I don't understand it. This:
Quote:
 Generate a room such that Wmin <= Rw <= Wmax and Hmin <= Rh <= Hmax.
is the first thing I don't get. What's Wmin? Help? Thanks in advance!

Share on other sites
I'm assuming the author at that site means for Wmin to imply a minimum width, set by you as a constant value somewhere for determining the minimum room size, meaning that no room's width will be less than Wmin. Wmax would be the max width, a maximum which no room in the dungeon can be greater than. Same with Hmin and Hmax, except applying to height instead. Rw would then be a random width between the values Wmin and Wmax, Rh a value between Hmin and Hmax.

That make sense?

Share on other sites

OK, the next thing I don't understand is this:

Quote:
 Put the upper-left corner of the room at C. Set the "current" score to 0.

What does it mean by putting it at C? What's C mean?

Thanks!

Share on other sites
He uses C as the current cell (wherever that may be).

The theory and practice of this works well as you can see by the demos he has. Basically he makes a maze and then creates rooms in the maze so as not to block off the routes in the maze. I recommend looking through the core code he releases at the bottom of the article in the dungeon directory specifically the jbdungeon and jbmaze files.

It is a little cryptic but if you play around with it you should be able to come up with something useful.

I would also look into the text based rogue and rogue-like games. They all have randomly generated mazes that could come in handy and they aren't as complicated.

Share on other sites
I am using a roguelike, that's why my code has to be different. His is more for straight-line mazes, and if I use his method I'll end up with a screen filled by #'s or *'s...

Do you know any roguelike I can look at the source of? Thanks!

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• Forum Statistics

• Total Topics
633297
• Total Posts
3011247
• Who's Online (See full list)

There are no registered users currently online

×