Page 1 of 1

Dungeon generator broken

Posted: Wed 25.03.2015, 18:52
by PowerWyrm
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

Re: Dungeon generator broken

Posted: Mon 11.02.2019, 11:01
by Flambard
Tracking as #1042