18 hours ago · Tech · 0 comments

I’ve added in Dot and it’s clear we have work to do. Result: 1000X faster. I was just messing about while in an online chat and put in Dot: def on_draw(self): self.clear() self.draw_rooms() self.draw_contents() def on_key_press(self, symbol: int, modifiers: int) -> bool | None: if self.key_lock is not None: return self.key_lock = symbol if symbol == arcade.key.RIGHT: self.dungeon.move_adventurer_east() elif symbol == arcade.key.LEFT: self.dungeon.move_adventurer_west() elif symbol == arcade.key.UP: self.dungeon.move_adventurer_north() elif symbol == arcade.key.DOWN: self.dungeon.move_adventurer_south() else: self.key_lock = None def on_key_release(self, symbol: int, modifiers: int) -> bool | None: if symbol == self.key_lock: self.key_lock = None def draw_contents(self): adventurer_cell = self.dungeon.player_cell cx = adventurer_cell.x*cell_size + cell_size//2 cy = adventurer_cell.y*cell_size + cell_size//2 arcade.draw_circle_filled(cx, cy, cell_size//2, arcade.color.RED) #…

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