134 days ago · 13 min read2667 words · Tech · hide · Fediverse post

Hello, loves! We’re on the hook for extending illumination, and we need some way to remove the Path of Skulls. When Dot has ‘a brilliant torch’, we want to illuminate whole rooms as she enters them. And after we build the Necrotic Path of Skulls, we should find a sensible way to remove it. I think we’ll need an actual idea for that bit. If memory serves — Objection! Assumes facts not in evidence! — we already have the full-room illumination code somewhere. Let’s look. class RoomView: def illuminate(self): dot = self.dungeon.player_cell self.illuminate_around(dot, 4) def illuminate_around(self, center, distance): for cell, sprite in self.cell_sprites.items(): if cell.manhattan_distance(center) < distance: self.dungeon_view.light_up(cell) sprite.visible = True def illuminate_room(self): for cell, sprite in self.cell_sprites.items(): self.dungeon_view.light_up(cell) sprite.visible = True illuminate_room is only called by a test. Good that it’s tested, since it clearly couldn’t possibly…

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