# LANE B — Flight & Combat (controller, weapons, enemies)

Mission: the game *feel*. Flow-locked flight that's silk at 60 fps, readable combat, enemy
behaviors with personality. You own `web/js/flight/**` and `web/js/combat/**`.

## Flight (the hybrid model, GDD-settled)

- Player state lives in **spline space** in tube mode: `(s, x, y)` where (x,y) is the
  cross-section disc offset. `ds/dt = biome.flow · throttle + boost`; throttle ∈ [0.6, 1.4],
  boost bursts +120% with i-frames. Convert to world space via `world.sample(s)` frame.
  Clamp disc position against `world.wallRho(s, θ)` — wall contact = velocity-scaled coat
  damage + a shove, never a hard stop (arcade, not sim).
- **Arena mode** (world.modeAt): same inputs drive free 6DOF (velocity-damped, no gravity),
  clamped to `arenaAt` bounds. Mode transition = smooth handoff over ~0.5 s at the gate.
- **Input:** mouse-aim + WASD (strafe = disc movement), Space boost, gamepad twin-stick.
  Aim reticle leads the ship (Star Fox lag), ship banks into lateral motion.
- **Camera rig:** chase cam on the parallel-transport frame, spring-damped, slight FOV kick
  on boost. Camera roll follows frame `nor` — never world-up in tube mode (this is why A
  uses parallel transport; if you see roll snapping, file it to A, don't hack it here).
- Riding a peristalsis crest (`world.flowPulse(s,t)` > threshold at your s) grants surf
  boost — the esophagus mechanic. Feel numbers documented in NOTES as you tune.

## Combat

- **Weapons:** lysozyme cannon (hitscan-ish fast pellets, heat meter), antacid torpedo
  (slow AoE projectile; emits `level:neutralize {s, radius, duration}` on the bus — A/C
  consume for acid zones). Pooled projectiles, InstancedMesh, one draw per weapon type.
- **Damage model** (GDD): mucus coat (regen, ambient drain = `biome.coatDrain`) over hull.
  Emit `player:damage {amount, kind}`; E renders the feedback, you own the numbers.
- **Enemy framework:** `combat/enemies.js` registry — `spawn(type, {s, theta, rho})` from
  C's level events (listen `level:event` type `spawn`). Behaviors are small state machines
  updated in one pass; visuals = emissive primitives (ART_BIBLE colors) with
  `assets.get('models', type)` upgrade path when D's GLBs land (swap mesh, keep logic).
- Round-1 archetypes: **floater** (amylase droplet — drifts, contact aura), **seeker**
  (pepsin — pursue in spline space, cheap: chase in (s,x,y)), **turret** (wall-mounted,
  homing darts with turn-rate limit — dodgeable by design). More per GDD roster later.
- Hit tests: sphere-vs-sphere in world space, broad-phase by s-bucket. No physics engine.

## You owe / consume

Owe: `createPlayer(…)` + `createCombat(…)` factories (TECH convention), bus events as
specced, feel-tuning writeup in NOTES (the numbers ARE the deliverable). Consume: world
contract (build against `?stub=1` until A lands — the stub is the contract), C's events,
E renders your bus emissions, D's models optionally.

## Laws

Everything pooled + disposed (leak-test enter/exit). Determinism: enemy RNG from `core/rng`
streams. ≤80 draws budget for all combat visuals. Playability > realism, always. Screenshot
+ short capture evidence (`docs/shots/laneB/`); cite `window.DBG` numbers in NOTES.
