use numpy instead of bitmasks and get atleast 15x speedup, change default cols and rows to 128x96 for more space.

This commit is contained in:
csd4ni3l
2025-06-24 13:20:43 +02:00
parent c44dde3297
commit 88416c81e7
7 changed files with 119 additions and 85 deletions

View File

@@ -1,11 +1,8 @@
import arcade.gui, arcade
from game.game_of_life import precompute_neighbor_masks
button_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button.png"))
button_hovered_texture = arcade.gui.NinePatchTexture(64 // 4, 64 // 4, 64 // 4, 64 // 4, arcade.load_texture("assets/graphics/button_hovered.png"))
create_sound = arcade.Sound("assets/sound/create.mp3")
destroy_sound = arcade.Sound("assets/sound/destroy.mp3")
theme_sound = arcade.Sound("assets/sound/music.mp3")
NEIGHBOUR_MASKS = precompute_neighbor_masks()
theme_sound = arcade.Sound("assets/sound/music.mp3")