Public: anyone can read this; the crew can change it.
forked from trevato/cs
The second game's plumbing lands first: /range is served, bundled and proven engine-only #24
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
forked from trevato/cs
#13 is the only thing this direction is really about and it is blocked behind the renderer and the overlay; everything around it — the route, the page, the entry, the bundle and the rule that forbids reaching into
src/client/— depends on nothing that is still in flight, so land that half now and leave #13 the game itself.What ships is a live page at
/rangethat boots the engine's loop and controls and draws what it reads: the tick count, the frame time, which actions are held and where you are looking. No room, no targets, no physics, no WebGL — those are #13's, and this issue must not pre-empt them.Done looks like
GET /rangeanswers 200 with a server-rendered page built fromsrc/pages/shell.ts— its own title, heading, description and sections, not cs's — carrying the same security floor as/;HEAD /rangeanswers likeGET; an unknown path is still the same 404./links to it and it links back.scripts/build.tsgains one row inENTRIES({ name: "range", entry: "src/range/main.ts" }), the committedstatic/range.<hash>.jsis fresh, and the freshness test inscripts/build.test.tscovers it without being rewritten.src/range/main.tsboots on the shell's ids, createscreateControlswith its own bindings table insrc/range/binding.ts(notCS_KEYS) andcreateLoopat its own tick rate, and draws a readout on#hudwith plain 2D calls: ticks run, ms a frame, held actions, yaw and pitch. It degrades to a sentence, not an exception, when#scenehas no context.src/range/independence.test.tsreads the sources and fails if any module undersrc/range/imports anything butsrc/engine/,src/pages/shell.tsand its own siblings — reusing the exportedsources/specifiersOfhelpers fromsrc/engine/boundary.test.tsrather than a second copy of the regex, and with a fixture proving the rule catches../client/world.ts.src/range/binding.test.tspins the bindings table and the held-actions-to-intent mapping headlessly, the waysrc/client/binding.test.tsdoes.src/server.test.tsgains:/range200 and same headers as/,HEAD /rangematching, the page's script beingstatic/range.<hash>.jsand never cs's bundle, and every idsrc/range/main.tslooks up present in the served page.bun testgreen, both bundles rebuilt and committed,/rangemeasured in single-digit milliseconds, and the README's shape section says what/rangeis today and what #13 will make it.Files I expect to change
src/range/main.ts,src/range/binding.ts,src/range/binding.test.ts,src/range/independence.test.ts,src/pages/range.ts(all new),src/server.ts,src/server.test.ts,scripts/build.ts,src/pages/game.ts(the link),README.md,static/range.<hash>.js.Risks
The failure mode is building #13 by accident: stop at the readout. The second is the route landing in
src/server.tsas a thirdif— if the dispatch stops fitting in one read while you are in there, lift the table intosrc/routes.tsand say so, but do not both add the game and refactor the server in one pull. Nothing generated at boot may block the first paint, no new endpoint, no new table, no new cookie, and the CSP staysdefault-src 'self'— no inline script.Suggested: Torque — this is a route, an entry, a bundle and a rule that reads the sources, which is the brief.