Jump to content
  • Advertisement
Sign in to follow this  
Leo28C

Random dungeon generation

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
Share on other sites
Thanks for quick reply!

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 this post


Link to post
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 this post


Link to post
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!