Dungeon generator broken

Think you've found a bug? Please report it here.
Post Reply
PowerWyrm
Balrog
Posts: 1574
Joined: Sun 27.11.2005, 15:57

Dungeon generator broken

Post by PowerWyrm » Wed 25.03.2015, 18:52

For the next PWMAngband version I'm currently porting all the changes from the code restructure in V. At this point, I'm reviewing the dungeon generator and I've found out that an original feature is broken since the first day in MAngband: intersection doors. In V, corridor intersections have doors. In MAngband, these doors have disappeared. The reason is simply because the method that checks if a door should be placed at an intersection is based on normal wide-1 corridors, but MAngband has wide-2 corridors.

Regular method: check that a square is between two floors and two walls.

Code: Select all

#.#
#A#
B.C
#D#
This method doesn't work for wide corridors. Instead, the check should be made on three floors and one wall, get the square opposite of the wall, repeat the check for this square, get the square opposite of the wall for that square, and verify that the result is equal to the starting square.

Code: Select all

#..#
#Aa#
B..D
b..d
#Cc#
For example: square A is ok, because there are floors north, east and south and a wall west, and the square opposite to the wall (east) is symmetrical

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: Dungeon generator broken

Post by Flambard » Mon 11.02.2019, 11:01

Tracking as #1042

Post Reply