Extraneous doors
Posted: Sun Jan 09, 2011 9:31 am
This has irritated me for a while actually... Currently dungeons end up with a lot of pointless doors. It makes the game look incredibly sloppy and unpolished.
I've given it some hard thought and I think there a simple test to cut out 99% of these pointless doors. For each door placed check the 4 squares immediately above/below/left/right of the door square. To be a door it must be satisfy the following condition:
Where + is the door in question and . must be a passable floor tile. If it fails both conditions it should be a wall.
Obviously this needs some testing, but I've been analysing the dungeon layouts and I can't see any flaws in it. It cuts out doors into nowhere and doors in diagonal junctions and doors that can be walked around anyway.
I've given it some hard thought and I think there a simple test to cut out 99% of these pointless doors. For each door placed check the 4 squares immediately above/below/left/right of the door square. To be a door it must be satisfy the following condition:
Code: Select all
.
+ or .+.
.
Obviously this needs some testing, but I've been analysing the dungeon layouts and I can't see any flaws in it. It cuts out doors into nowhere and doors in diagonal junctions and doors that can be walked around anyway.