feat: implement gameloop

Implement a basic game loop that draws the startscreen, and the map after you hit the right button
This commit is contained in:
Niklas Haiden
2026-05-08 15:32:58 +02:00
parent 872786c8e3
commit 20e106cb01
4 changed files with 172 additions and 9 deletions
+7 -1
View File
@@ -1,6 +1,8 @@
# --- DESK ---
from typing import Mapping, Literal, Tuple
from src.map import tile_size
DESK_WIDTH = 70
DESK_HEIGHT = 40
@@ -30,7 +32,7 @@ DIRECTION_FRAMES: Mapping[Direction, Tuple[int, int, int]] = {
# Default drawing size and animation speed.
DEFAULT_SPRITE_HEIGHT: int = 138
DEFAULT_FRAME_TIME: float = 0.16
=======
# --- ECTS ---
START_ECTS_VALUE = 1 # how many ECTS are generated at the beginning
@@ -91,3 +93,7 @@ COLOR_HP_BAR_YELLOW = (255, 255, 0)
HUD_BAR_WIDTH = 100
HUD_BAR_HEIGHT = 15
PLAYER_SPEED = 180.0
DEMO_ACTOR_HEIGHT = tile_size * 3
FPS = 60