Author Topic: I need clarification in the dungeon generator wiki...  (Read 12983 times)

Yttermayn

  • Newcomer
  • Posts: 2
  • Karma: +0/-0
    • View Profile
    • Email
I need clarification in the dungeon generator wiki...
« on: August 25, 2012, 02:31:22 PM »
http://roguebasin.roguelikedevelopment.org/index.php/Grid_Based_Dungeon_Generator

Specifically, when it comes time to draw the rooms inside the cells, how is it determined where inside the cell to draw the room to make sure that the room edges do not extend beyond the bounds of the cell?
For example, if you are drawing the room left to right and top to bottom, the only thing I can think of is that the room starts drawing in the upper left corner.  However, the examples in the article do not always show that.
Can anyone please clarify?  I need to get a really clear picture of how dungeon generation works, as I am going to attempt to script on into 001 engine.

Paul Jeffries

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 257
  • Karma: +1/-0
    • View Profile
    • Vitruality.com
Re: I need clarification in the dungeon generator wiki...
« Reply #1 on: August 25, 2012, 10:48:22 PM »
I didn't write that article and I've never used that generation method, but I would assume it's usually just placed randomly.  i.e. the room width and height are randomly generated within a desired range and then the position of the top left corner is also randomly picked with x in the range 1:(cellwidth-roomwidth) and y in the range 1:(cellheight-roomheight).  But that article just gives a basic framework in any case - you can implement it any way you want.

Yttermayn

  • Newcomer
  • Posts: 2
  • Karma: +0/-0
    • View Profile
    • Email
Re: I need clarification in the dungeon generator wiki...
« Reply #2 on: August 27, 2012, 01:17:40 PM »
Thanks anyways though, you answered my question in such a way i understood it.  Leaves me wondering why I didn't think of it?  :)  Thanks again, perfect answer.