Fixed-step world runtime, event bus wire protocol between lanes, integration seam (game.ts) with placeholder ball. Lanes A/B/C own disjoint dirs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Lane A — Engine / Feel
Owns: src/blob/, src/course/, demos/lane-a.html, src/demo/lane-a.ts.
Never touches: src/contracts.ts, src/world.ts, src/game.ts, src/main.ts,
package.json, other lanes' dirs. New deps are not allowed — three + rapier only.
Mission
Make moving a blob around feel funny and good. Build the blob controller, the follow camera, the squash/jiggle, and a greybox course chunk to play in.
Deliverables
src/blob/createBlob.ts— implementsBlobfromsrc/contracts.ts:- Rapier dynamic ball collider (radius ~0.5) + THREE group with a soft white blob mesh (UV sphere is fine — clean UVs matter, Lane B paints them).
- Movement: WASD/arrows accelerate via impulses/torque, camera-relative; Space = jump (grounded check via ray or contact); small air control.
- Reads
blob.modifiersEVERY frame and respects:speedMul,jumpMul,massMul(scale collider mass),grip(0..1, boosts effective friction / kill slide),size(uniform visual+collider scale).
- Feel layer: squash on landing, stretch on jump, idle wobble — cheap sine/spring on mesh scale or vertex shader. It should read as soft-body even though physics is a rigid ball. This is the game's comedy engine: overshoot it.
src/blob/camera.ts— third-person soft-follow camera with lag + slight FOV kick at speed.src/course/greybox.ts— exportbuildGreybox(world): a Breakfast Rush test chunk from primitives: start plateau, two ramps, a gap jump, a slope, a flat "milk river" plane (taggedsurface:watervia userData), open flat area (machines land here in integration), finish pad. Big, readable, absurd proportions.- Demo page
demos/lane-a.html+src/demo/lane-a.ts: boots world, builds greybox, spawns blob, plays. Add 3 debug keys: 1/2/3 setmodifiers.speedMul=1.6/jumpMul=1.5/size=1.5to prove modifier plumbing.
Acceptance
npm run buildpasses. Demo runs at 60fps.- Blob accelerates, jumps, lands with visible squash; wobble reads as soft.
- Debug modifier keys visibly change behavior.
- No edits outside owned paths.
Contracts (frozen — read src/contracts.ts first)
Events you may emit: blob:landed {impact:number}, blob:jumped.
The world fixed-steps physics at 60Hz; register via world.addSystem.