"""Global tunables. Anything a level does not override falls back to these.""" # --- Display ----------------------------------------------------------------- TILE = 32 # default tile size in pixels (levels may override) FPS = 60 CAPTION = "Dying Phone" # Debug view only: how many extra tiles to reveal beyond the level on every side, # so off-screen geometry (e.g. an invisible catch-wall a step off the map) is # visible while designing. The true play area is outlined within this margin. DEBUG_VIEW_MARGIN = 1 # tiles of overscan shown around the level in debug # --- Physics (pixels / second, unless noted) --------------------------------- GRAVITY = 2200.0 # downward acceleration MAX_FALL = 1400.0 # terminal velocity MOVE_SPEED = 320.0 # horizontal run speed ACCEL = 3200.0 # ground acceleration toward target speed AIR_ACCEL = 2200.0 # weaker control in the air FRICTION = 3600.0 # deceleration when no input on ground JUMP_SPEED = 760.0 # initial upward velocity of a jump JUMP_CUT = 0.45 # velocity retained when jump released early (variable height) COYOTE_TIME = 0.10 # seconds after leaving a ledge you can still jump JUMP_BUFFER = 0.10 # seconds a jump press is remembered before landing # --- Gameplay ---------------------------------------------------------------- DEFAULT_BATTERY = 45.0 # seconds of phone battery if a level doesn't set one DEFAULT_BATTERY_PCT = 12.0 # how full the battery *looks* at the start (visual only; # the phone is dying, so the bar reads near-empty) DEATH_PAUSE = 0.5 # seconds the corpse lingers (traps frozen) before respawn CHARGE_TIME = 1.0 # seconds the battery-fill animation plays on level clear FADE_TIME = 0.3 # seconds for each half of the fade-to-black transition # --- Colors (placeholder rendering) ------------------------------------------ COLOR_BG = (24, 26, 38) COLOR_HUD = (235, 235, 245) # Fallback colors + labels for placeholder rectangles, keyed by sprite name. PLACEHOLDERS = { "player": ((90, 200, 255), "P"), "player_dead": ((120, 40, 40), "X"), "block": ((110, 120, 140), ""), "goal": ((90, 230, 130), "GOAL"), "fake_block": ((110, 120, 140), ""), # looks identical to a real block on purpose "spike": ((230, 80, 80), "^"), "moving_block": ((150, 130, 90), ""), "patrol_block": ((130, 100, 170), ""), "crumble_block": ((150, 120, 100), ""), "arrow_shooter": ((80, 80, 95), ""), "arrow": ((250, 220, 90), ">"), "spike_block": ((150, 156, 172), "*"), "phase_block": ((90, 180, 210), ""), }