GDD v1 (flow-locked hybrid movement, 5 biomes + secret, boss roster), TECH contracts (world API, level schema v0, bus events, manifest law), ART_BIBLE (synthetic scanner look), PIPELINE (MODELBEAST-first, fal gated), PROCESS (PROCITY lane/round law), charters A-F + ROUND1 instructions. Seed code: shell + boot + core (rng/bus/flags) + stub world (peristalsis shader tube, 1 draw / 102k tris, contract-complete) + qa.sh (GREEN). Verified in-browser; evidence docs/shots/laneF/round0_stub_tube.png. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3.2 KiB
3.2 KiB
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 viaworld.sample(s)frame. Clamp disc position againstworld.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
arenaAtbounds. 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. Emitplayer:damage {amount, kind}; E renders the feedback, you own the numbers. - Enemy framework:
combat/enemies.jsregistry —spawn(type, {s, theta, rho})from C's level events (listenlevel:eventtypespawn). Behaviors are small state machines updated in one pass; visuals = emissive primitives (ART_BIBLE colors) withassets.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/); citewindow.DBGnumbers in NOTES.