cntrl/docs/GAME_DESIGN_PASS.md
dandovlatov f95586cba3 Added the PUSH skill on L: radial knockback and stagger with rebuilt rubble
PUSH is a fourth always-available active skill bound to L (gamepad RT).
It shoves visible enemies in a 6 m radius outward, damages them and holds
them in a 0.55 s stagger that stops chasing and attacks. Autoplay toggling
moves to Tab so the new key is free.

The effect reuses the rock-debris pool via a new radial burst variant and
the shattered-concrete GLB rebuilt in Blender: broken slabs, raised
splinters, bent rebar and Hiss cracks. Warm rings, ground pulse, sparks
and tumbling GLB shards carry the shockwave; stagger feeds the actor recoil
shader. HUD, docs and skill tests updated.
2026-11-25 04:22:37 +04:00

175 lines
9.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Game Design Pass
## What works
- Core loop: move/dash + auto-weapons + magnet XP + real-time corruption.
- Corruption: continuous scaling, named tiers, event hooks.
- Credit director: income scaling, too-cheap rule, banked heavy burst.
- Combat math: damage, cooldowns, pierce, AoE, homing, enemy damage taken.
- Ritual MVP: TV and lightswitch with HUD states.
- World objects: random player/enemy effects with magnet pickup.
- Architecture: fixed 60 Hz sim, clean sim/render split, spatial hash, pools.
## What lacks
- Progression is mostly decorative: XP/level increases but weapon levels and Directives are not awarded.
- OoP roster incomplete: 4 of 10; evolutions are data-only.
- Rituals do not grant powers.
- Enemy variety thin: no Elevated, Cluster, Host, Threshold, Taken, elites, bosses.
- No run structure: single arena, no floors, keys, side rooms, shop, finale.
- No meta progression: Panopticon unlocks and starting loadout are docs-only.
- Player has no build stats: no regen, armor, HP growth, passives.
- UI is grey-box: no FBC paperwork, fonts, or audio.
- Some documented mechanics are unused: spawn_rate_mult, elite tiers, caps/stacking.
- No balance telemetry.
## Recommended improvements
1. Make XP meaningful: offers -> weapon levels/Directives/passives -> evolutions.
2. Complete ritual rewards.
3. Add elite affixes.
4. Implement floor/key flow.
5. Enforce caps and stacking.
6. Add audio + fonts.
7. Add automated smoke tests.
## Status update (2026-11-24)
The "What lacks" list above is a historical snapshot. Current state:
- **Done since the pass:** XP offers now award weapon levels, Directives and
passives (`game.cpp`); evolutions have real behavior changes; Floor 01 is a
playable 160 x 120 m blockout with room collision, side rooms, a key in the
Silos and a threshold door in the stairwell; player build stats (regen,
armor, passives) exist; audio/fonts are still outstanding.
- **Done in the level-design follow-up:** the Projector is now a ritual that
grants a permanent OoP skill (`WeaponType::Projector`); a completed ritual
can be replaced by another one and each ritual is claimable once per run;
the three side-room doors are clearance-gated and each side room has a
one-time reward; the blocked Projector -> Office route is open.
- **Still open:** 6 of 7 floors, Oceanview Motel, 7 bosses, 5 enemy archetypes,
elite affixes, `spawn_rate_mult`, audio, bundled OFL fonts, balance telemetry.
See `docs/LEVEL_DESIGN_REVIEW.md` for the full audit and `docs/MAP_FLOW.md`
for the current floor-flow status.
## Pacing pass (2026-11-24)
**Problem:** the Service Weapon started at ~109 shots/min and, with the old −8%
cooldown-per-level ramp plus stackable fire-rate offers, could reach ~237/min
inside the first minute. Other OoPs piled on top of that.
**Change (all progression slowed, corruption clock unchanged):**
- `weapons.cpp` — Spin base cooldown 0.55 → 0.95 s; cooldown scaling −8% → −3%
per level; damage scaling +35% → +28% per level.
- `game.cpp` / `game.hpp` — Rapid Cycling +15% → +8%, Board Favor +8% → +4%,
Maintenance passive +10% → +5%; XP curve 6+4·L → 10+6·L; offers apply every
3 s (5 s idle fast-track) instead of 2 s (3 s).
- `director.hpp` — base income 4 → 3 and spawn interval 1.5 → 2.0 s so the
quieter opening still has a fair kill race.
Spin now runs at ~63 shots/min at level 1 and ~90/min at full level/buff stack.
Full table and rationale in `docs/GAME_DESIGN.md` §11.
**Not touched (separate work):** the Projector ritual weapon still has no firing
case in `WeaponSystem::update()`; it is acquired but never shoots.
## Crystal/buff decoupling (2026-11-24)
**Problem:** every kill spawned a random buff/debuff `WorldObject` at the exact
same spot as the XP crystal, and `PickupSystem::update` collected both with one
magnet loop. The spawn probability (`0.8 + 1.5c`) saturated after ~1 minute, so
essentially every cyan crystal also handed out a random status effect. The
`ResonanceAttunement` pickup-radius Directive enlarged both catch fields.
**Fix:**
- `game.cpp` — `death_pass()` now drops an XP shard only; the per-kill
`spawn_world_object()` call is gone. `ShardCollected` is only emitted for
actual shard/XP rewards, not every side-room reward.
- `pickups.{hpp,cpp}` — `PickupSystem` owns shards alone; no `BuffSystem` or
`EnemySystem` parameters. Crystals can only produce XP.
- `buffs.{hpp,cpp}` — new `BuffSystem::update_world_objects()` catches ritual
bait / object-cache effects with a dedicated 2.8 m field radius, independent
of the shard magnet. Enemy-channel effects still pick the nearest enemy
within 2.2 m; effect-less bait is consumed without creating a buff.
`spawn_world_object()` is now an explicit, guaranteed spawn used only by
rituals and side rooms (the old corruption-scaled random rate is gone).
- `player.hpp` / docs — `ResonanceAttunement` is documented as shard-only;
`GAME_DESIGN.md` §2/§4.5/§4.6, `RPG_LITE.md` and the README now state that
buffs/debuffs belong to other OoPs and objects, never to crystals.
**Verification (headless 60 s sim):** 24 kills → 0 world objects and 0 buffs;
a shard at 2.5 m stays uncollected with a 1.0 m shard magnet while a world
object at 2.5 m is caught; the lightswitch ritual still spawns 3 baits,
completes and applies FLUORESCENT LIGHT.
## Beacons replace the Threshold exit flow (2026-11-25)
**Change:** the whole Threshold Key / hazard door / stairwell exit mechanic is
removed from the running game — no `has_key`, no key/exit anchors, no key or
hazard-door props, no floor-jump, and no "Threshold" text in the HUD or room
name. The old `KeyAcquired` / `FloorCleared` events are gone.
In its place, Floor 01 has three **Beacons** along the main route (Security
Gate, Central Plaza, Silos). They are a new `PropKind` and a new `ActorModel`
backed by `assets/models/props/beacon.glb`, generated by
`tools/blender/build_beacon.py`: a 40%-oversized, aged triangular prism with
oxidised pewter panels, root-like tracery and a solid plinth. The plinth has a
cheap axis-aligned collider in `Floor`, so the player cannot run through it.
Walking within 2.5 m activates a beacon. Inert beacons are grey with a faint
dark-red Hiss wave (the existing `uHiss` shader); activated ones turn a hot,
bright red with a strong emissive glow, a stronger Hiss wave and a red floor
disc. The third activation emits `BeaconActivated` / `BeaconsComplete` and a
"ALL BEACONS ACTIVE" banner. **What the completion event actually does is still
to be designed** — for now it is presentation only.
**Verification:** `ctest --test-dir build` passes all 11 tests, including the new
`beacon_activation` test (three activations, one completion event, reset and
collision). `--beacon-test` spawns the player on the first beacon for QA of the
grey/red states; `--plaza-test` shows an inert beacon at tactical distance.
## Active-skill polish pass (2026-11-25)
Both baseline skills (CONCRETE CALL / WARP) got a systemic and visual pass.
**Systemic:**
- `skills.cpp` — a manual press now stores its own queue lifetime tied to that
skill's cooldown. The old queue expired with the global 5 s manual window,
so presses made early in a 9 s WARP cooldown were silently lost.
- `manual_hold` is per skill: pressing J no longer parks WARP and FLUORESCENT
on manual for five seconds. Fruitless autoplay target scans are throttled to
~5 Hz, and the targeting hash is reused instead of rebuilt on every probe.
- Targeting requires line of sight (`Floor::blocked` sampling); piles no longer
fly or explode through walls, and WARP pulls/bursts only its locked crowd.
The heap steers toward a moving crowd during flight with a capped turn rate
and a timeout safety net.
- `events.hpp` — SkillCast flags are explicit bits (`kCastConcrete`,
`kCastWarp`, `kCastFluorescent`) instead of an index accidentally used as a
bitmask. Event capacity is 1024, and each skill pushes its VFX event before
its per-enemy hit events so a full queue cannot swallow the payoff. Damage
numbers now show the applied (mitigated) value and dead enemies are skipped.
- Timers advance during the blackout pocket too, so the "run never pauses"
contract holds for cooldowns as well as the corruption clock.
- `skills_test.cpp` — new coverage for long-cooldown queues, per-skill
autoplay, cast flag bits and moving-crowd retargeting.
**Visual:**
- `aura.{hpp,cpp}` / `aura.fs` — ground waves carry a tint. WARP telegraphs are
astral teal, CALL uses pale concrete dust, FLUORESCENT uses Board yellow; the
default red Hiss wave is reserved for corruption events.
- `presenter.cpp` — new lightweight skill rings drive landing telegraphs,
dust puffs and a post-collapse implosion. WARP rings now descend and tighten
with tethers to the locked crowd plus a bright core; CALL gets a dust wake,
grey-tinted rubble and a grey (not Hiss-red) impact decal.
- `ui.cpp` — HUD stamps use per-skill accent colors and reveal a `Q` badge for
a queued press.
- PUSH adds a fourth stamp (`L`, warm charged-concrete palette): the shattered
GLB rubble from CALL flies outward with two expanding dust rings and a warm
ground pulse. Staggered enemies recoil via the existing actor `uStagger`.
`L` was formerly the autoplay toggle; that moved to `Tab` (gamepad Back
unchanged). `--skill-test` now rotates CALL / WARP / PUSH every 3 s;
`--screenshot-at` is keyed to sim time in that mode for repeatable captures
(e.g. 0.5 s gather, 0.75 s impact, 6.1 s PUSH burst).
**Verification:** 16/16 ctests pass; staged captures confirm the dust/teal
palettes and the impact/collapse beats.