Tiny Object FTW 0 ▲ ronjeffries.com 127 days ago · 6 min read1223 words · Tech · hide · Fediverse post 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)… 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