guts/docs/LANES/LANE_A_WORLD.md
jing 34f84ab162 [lane F] Round 0 scaffold: docs, contracts, lane charters, bootable stub world
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>
2026-07-16 01:28:35 +10:00

2.9 KiB
Raw Blame History

LANE A — World (canal geometry, biome shaders, arenas)

Mission: the alimentary canal itself — a living, pulsing, deterministic tube-world that implements THE WORLD CONTRACT (TECH.md) exactly, looks like the ART_BIBLE, and stays inside the perf budget. You own web/js/world/** and nothing else.

Core design (settled)

  • Centreline spline per level, generated from C's level JSON (segments[].curviness, seeded via core/rng.js): sum of seeded low-frequency sine/fbm offsets along the main axis — smooth, no self-intersection, byte-identical per seed. Arclength-parameterized lookup table (s → t) so sample(s) is O(1)-ish.
  • Parallel-transport frames (not Frenet — Frenet flips on inflections and will make B's camera roll-snap; this is the classic tube-racer bug, don't ship it).
  • Tube chunks: extruded rings, ~2 rings/unit × 6496 radial segs, chunked every ~40 units; stream a window of chunks around playerS (build/dispose, leak-clean). Bake (s, θ) into UV2 for the shader.
  • Radius law: radius(s) = base · (1 + wobble·fbm(s)), plus per-biome features (villi band in small intestine as InstancedMesh cones on the wall — instanced, one draw).
  • Wall shader (ShaderMaterial, ART_BIBLE recipe): biome tint × detail texture (luminance, from D via assets.get, flat-tint fallback) + fresnel rim + fog-to-void. Peristalsis in the vertex shader: disp = A·max(0, sin(k·s ω·t))³ traveling wave + small fbm breathing, along inward normal. Export the same phase function to JS (world.flowPulse(s, t)) so B can boost players riding a wave crest and E can pulse audio.
  • Arenas: displaced icospheres (seeded fbm) with the same wall shader; arenaAt gives B the 6DOF clamp bounds. Stomach arena has an "acid level" plane (animated, emissive #c8ff3a) whose height C's events can move.
  • Collision truth: wallRho(s,θ) = geometric radius max displacement amplitude skin margin. collide() for arena mode + hazards. Cheap, analytic, no physics lib.

You owe others

  • The world contract, frozen after round-1 sign-off (changes after that: propose in NOTES, F referees). world.hash() golden determinism hash + a qa selfcheck.
  • ?fly=1 noclip camera so everyone can inspect your work without Lane B.
  • js/world/biomes.js — the palette/params registry (values from ART_BIBLE; C's JSON references biomes by id).

You consume

C's level JSON (schema TECH.md), D's textures via assets.get (never hard-require), F's core/{rng,bus,flags}.js, stub as reference implementation of the contract.

Laws

Determinism (no Math.random, no Date.now in geometry paths — shader time comes from world.update(dt) accumulation). Perf: tube worst-view ≤150 draws (leave headroom for B/E). Dispose-clean streaming (renderer.info deltas cited in NOTES). Screenshot evidence every round (docs/shots/laneA/), each biome as it lands.