DFRPGRandomDungeonGenerator icon indicating copy to clipboard operation
DFRPGRandomDungeonGenerator copied to clipboard

Doors between rooms are not "shared"

Open Syndaryl opened this issue 7 years ago • 3 comments

There's two related problems here:

  • When two rooms are adjacent, both rooms may knock doors into the wall between them. This increases the number of doors in a wall shared with two rooms to approximately twice the intended value
  • Each room only manages the list of doors it opened, and does not know about doors opened by other rooms into its area, even though to a human that door is clearly part of both areas.

This results in a) a funny number of doors that b) are inevitably not completely described

EDIT:

  • [ ] Create central door registry (include door object, and co-ordinates)
  • [ ] move door creation to a separate pass after room creation
  • [ ] door creation needs to check the registry to ensure no conflict
  • [ ] write a method to determine if a room wall is shared with another room
  • [ ] door creation needs to inform the room on the other side of the wall

Syndaryl avatar Mar 08 '18 16:03 Syndaryl

Probably related to #61 - the solution for one should help with the other anyways.

Syndaryl avatar Jul 05 '18 17:07 Syndaryl

Additional issue is that the two rooms may knock a door through the same grid position

Syndaryl avatar Aug 21 '18 12:08 Syndaryl

The many door issues I think are best handled by pulling door code out of the room generation. Have a door pass after creating all the rooms. Create a central door registry to check against to prevent "overlap" as part of this.

Syndaryl avatar Aug 21 '18 12:08 Syndaryl