67 days ago · 7 min read1321 words · Tech · hide · Fediverse post

Hello, loves! If we make the path-maker sensitive to active regions, would that solve our issues? It might, but we solve them without that. Most peculiar. Note Not much code is written below, but then I remove it all and discover that I don’t need it. The issue we need to fix is that once we have populated three corners of the dungeon, we will have correctly connected those three: the first two have no choice but to connect, and two and three will connect correctly because #2 is closer to #3 than #1 is. But when we go to connect up corner #4, it is a toss-up whether #1 is closer to #4, or #3 is. #2 is right out. My first idea, as mentioned in the blurb, is to make the path making sensitive to region. If, before connecting #3 and #4, we set a right-side region, and only select rooms that fall in that region, it should do the right thing. Let’s see how we might do that: class DungeonLayout: def finish_map(self): self.ensure_connected() self.make_passages() def ensure_connected(self):…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town