1 hour ago · 9 min read1741 words · Tech · hide · 0 comments

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,…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.