Go to file
m3ultra 35981ade5f Lane C R6 C1: interior draw batching (<=350 draws/room law)
Review debt: book room was 1,245 draws GLB-on. Diagnosed two drivers —
multi-material stock boxes (one draw per face, 6x) and one mesh per stock
item — then batched:

- stock.js: stock boxes are single-material now; every stock mesh tagged
  userData.isStock.
- batch.js (new): batchRoom() two-tier merge, called from interiors.js before
  the GLB upgrade. Room-level merge of all isStock across every fitting
  (grouped by material, world transforms baked) + per-fitting merge of fixture
  frames (kept in-group so record bins stay raycast targets for ?dig=1 and the
  GLB upgrade can hide the fixture). Uses vendored BufferGeometryUtils
  mergeGeometries.
- glb.js: frame-hide is now by isStock tag (not frame-count), so batched
  fixtures hide while the room-level stock rides on the GLB.
- interior_test.html: drawSweep() asserts <=350 draws across all type x
  archetype (GLB off and on), folded into the soak; exposed as
  window.PROCITY_C.drawSweep for F's harness (hook in LANE_C_NOTES).

Result (drawSweep, seed 1990): GLB-off worst 152, GLB-on worst 313
(opshop/hall) — book 1,245 -> 189. Determinism 0 fails / 810, leak-free, dig
still riffles batched bins, worst warm build 38ms (<50), visually identical.
qa.sh --strict GREEN (5 gates).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 23:01:04 +10:00
docs Lane C R6 C1: interior draw batching (<=350 draws/room law) 2026-07-14 23:01:04 +10:00
pipeline Lane E round 6 (E1): publish.py merges (not clobbers) + provenance-drift QA gate 2026-07-14 22:37:55 +10:00
priorwork Fable (integrator): round-3 lane instructions + archive round-1 lane prompts 2026-07-14 14:30:36 +10:00
tools Lane F R6 F2: wire ?plansrc=osm shell selector + pin osm golden + dig nearest-bin fallback 2026-07-14 22:59:45 +10:00
web Lane C R6 C1: interior draw batching (<=350 draws/room law) 2026-07-14 23:01:04 +10:00
.gitignore Lane E round 5 (E1): bake 6 hero props to <=8k tris (288k->48k), live on depot 2026-07-14 20:56:07 +10:00
B-progress.md Lane B round-5 (v2): parallax interior-mapping window glass behind ?winmap=1 2026-07-14 21:00:57 +10:00
C-progress.md Lane C R6 C1: interior draw batching (<=350 draws/room law) 2026-07-14 23:01:04 +10:00
D-progress.md Lane D round-6: harden streamed roster + default-on readiness memo 2026-07-14 22:56:39 +10:00
E-progress.md Lane E round 6 (E1): publish.py merges (not clobbers) + provenance-drift QA gate 2026-07-14 22:37:55 +10:00
F-progress.md Lane F R6 F2: wire ?plansrc=osm shell selector + pin osm golden + dig nearest-bin fallback 2026-07-14 22:59:45 +10:00
README.md PROCITY scaffold: spec, research, 6 Opus lane prompts, core modules, vendored three r175, 69 inherited skins 2026-07-14 10:46:40 +10:00

PROCITY

A standalone, procedurally generated, fully walkable 90s-Australian shopping town — every building enterable (the Vuntra City trick), every interior seeded and themed: record stores, op shops, toy shops, book barns, video rental, pawnbrokers, milk bars, market stalls. Built on the proven house stack (three.js r175 vendored, plain JS, no build step) and the asset DNA of 90sDJsim + thriftgod. v1 is the system; the GODVERSE/BaseGod real-item content plugs in later.

Run

cd web && python3 -m http.server 8130
# http://localhost:8130            (game shell — Lane B)
# http://localhost:8130/map.html   (2D plan debugger — Lane A)

Read first

  • docs/CITY_SPEC.md — the treaty: schema, units, seeds, budgets, file ownership.
  • docs/RESEARCH.md — what the parent repos already solved, with exact paths to port from.

The lanes (parallel Opus 4.8 sessions)

Each lane is a self-contained prompt. To run one, start an Opus session in this repo and say: "Read docs/LANES/LANE_X_….md and execute it." AE are parallel-safe (disjoint files, standalone test pages); F integrates after they land.

lane mission owns
A — CITYGEN seed → CityPlan data (streets, blocks, lots, shops) + 2D map js/citygen, js/core/registry.js, map.html
B — STREETSCAPE chunk-streamed instanced 3D town + game shell index.html, js/world
C — INTERIORS every door opens: seeded themed shop interiors js/interiors, interior_test.html
D — CITIZENS rigged-near / impostor-far NPCs + shopkeepers js/citizens, citizens_test.html, models/
E — ASSETS audit ultra's library, normalize GLBs, skins, manifest pipeline/, assets/
F — INTEGRATION wire AE into one seed-to-town game + QA gates (after AE)

Already in the repo

  • web/vendor/ — three.js r175 + addons (vendored from 90sDJsim; no CDN at runtime).
  • web/assets/gen/ — 69 generated texture skins (25 shopfront facades, 10 skies, 10 grounds, 8 wallpapers, 16 interior surfaces) inherited from thriftgod + 90sDJsim, style-locked.
  • web/js/core/ — frozen shared modules: prng.js (seeded-everything law), loaders.js (fail-soft promise-cached GLB/texture + 3GOD depot), canvas.js (text planes).

House laws (short form — CITY_SPEC has the fine print)

Seeded everything, Math.random banned in gen code · the game must run with zero assets · instancing from day one · canvas text, no font files · characters = shared base rigs + one clip bank, canonical sources live outside this repo · 🟢 web-ok licensing only.