68 days ago · 9 min read1741 words · Tech · hide · Fediverse post

Hello, loves! Once we build a passage between two rooms, we want never to change or replace it. Seems easy enough … and, surprisingly, it is! Why do we need that? Well, when stepping the dungeon build, we need to update the view on every step, and part of updating the view is flooring, and flooring is sensitive to passages, and we do want to see the passages, so we want to continue to create them when we update the view, but passages are created randomly along borders, and as things stand we get more and more passages on the same border and we do not want that, that’s why. I’m starting to think, well, not exactly starting, because I’ve thought it before, but I’m thinking that this might be a good time to have some kind of passage-related objects. Currently, there’s just this kind of thing: class DungeonLayout: def __init__(self, max_x=10, max_y=10): ... self.passages: dict[tuple[Cell, Cell], bool] = dict() def add_passage(self, passage): if passage: c1, c2 = passage self.passages[(c1,…

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