Tiny Object FTW 0 ▲ ronjeffries.com 15 hours ago · 6 min read1223 words · Tech · hide · 0 comments Hello, loves! I was watching Antiques Roadshow, as one does, when it came to me that a tiny object might be just the thing for DungeonView. Let’s find out. DungeonView needs a lot of work, but the code of concern this morning is this: class DungeonView(arcade.View): def __init__(self, dungeon, testing=False): ... self.dungeon_floor_sprites = arcade.SpriteList() self.cell_sprites: dict[Cell, Sprite] = dict() self.content_views: dict[Content, ContentView] = dict() self.content_views_by_cell: dict[Cell, list[ContentView]] = defaultdict(list) self.illuminated_cells: set[Cell] = set() self.content_sprite_list = None ... DungeonView has way too many collections, but this morning we’ll look at these two: self.dungeon_floor_sprites = arcade.SpriteList() self.cell_sprites: dict[Cell, Sprite] = dict() Those are used, variously: def setup(self): self.setup_scroller() self.setup_cameras() self.dungeon_floor_sprites = arcade.SpriteList() self.create_rooms(self.dungeon_floor_sprites)… No comments yet. Log in to reply on the Fediverse. Comments will appear here.