Connecting Corridors

I got some hall connecting my rooms now. The vertical halls do not look great. But at least they work. I try to find rooms that are adjacent horizontally or vertically. Then I draw the hall between them at the centerpoint where they overlap.

Now I only consider rooms adjacent if they are truly next to each other, and a path between them does not cut through another room. That last part is important. If I did not check for that, there would be halls running everywhere. We don't want that.

With the connecting halls I can almost move around the whole maze. I still have a problem if I get too close to the edge of the whole maze. The viewport tries to display an area for which there are no underlying cells. I have two ideas to fix this problem. The simplest is to just fill up the maze with a huge border around all sides. Or I could detect when I get close to the edge, and simulate solid brick behind the outer walls.

No comments: