seriesoftubes/scripts
Antoine b9d6319302
The page stays free while big networks play: ambient map at 30 fps, saves in the worker, less to carry back
The game plays exactly as before; only what holds the page changes.

* mapStill() tells three cases apart: still (drawn once a second), ambient (only the animation clock moved: drawn at
  most every 29 ms, so 30 fps on 60 and 120 Hz screens) and moving (camera, pointer, selection, network: every frame).
  The animations follow the clock, so they keep their speed.
* save() skips the storage write when the text is the one the slot already holds (SLOT.txt) and no write is on its
  way; leaving the page still writes. A big autosave that moved on is packed, turned into text, stamped and
  compressed in the route worker (rwSave(), rwGzip()); the page only writes what comes back. A lost worker hands its
  pending saves back to the page (rwSaveBack(), rwGzBack()).
* Less crosses back from the worker: R.efg stays there while R is its own last answer (RW.wR, efg 0), R.egDesc comes
  as 0 or as the entries that changed (rwDescOut()/rwDescIn()), what crossed each link travels as typed arrays decoded
  on demand (rwLOut()/rwLIn()), and the full ports (hotMap) come along with R. Every message is read in order
  (rwMsg()), so both sides always hold the same last answer.
* Idle frames build the diverse-paths map and the latency floors a millisecond at a time (diversityWarm(),
  latWarm()), before the first offer asks.
* Diagnostic info shows how fast days really come: speed asked, speed held, how long a day takes (15-day-pace.js).
* perf-bench: "The NOC intern's shift: opsDay()" and, in Chromium, "One game day in play: page time only", a day
  played with the real route worker counting only the time it holds the page.

Tests: frame-pacing, day-pace, save-size, persist, route-worker (efg as typed arrays, hotMap from the worker),
day-steps (a second page plays the worker: answers without R.egDesc, with only its changes, posts without R.efg,
renewal haggles answered through the worker), intern-dark-fiber-worker, webgl-zoom-sprites, speed.
2026-11-07 22:22:51 +01:00
..
agent Tests wait for state instead of sleeping, on free ports 2026-11-05 11:38:26 +01:00
legacy Docs: the single-file page and English keys lasted until 1.34 2026-10-27 11:28:17 +01:00
lib Lambda Bazaar: a capacity market for your dark fiber 2026-11-07 13:34:41 +01:00
build.js Release notes: a story for big releases, and the 2.0 story 2026-10-30 16:28:19 +01:00
dev.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
gpu-bench.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
i18n-add.js Harden workflows and dev scripts against code-scanning findings 2026-11-05 21:04:21 +01:00
i18n-check.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
mcp.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
perf-bench.js The page stays free while big networks play: ambient map at 30 fps, saves in the worker, less to carry back 2026-11-07 22:22:51 +01:00
perf-browser.js The page stays free while big networks play: ambient map at 30 fps, saves in the worker, less to carry back 2026-11-07 22:22:51 +01:00
perf-fixture.js Performance benchmark on a big network, posted on every PR 2026-10-26 06:39:23 +01:00
perf-stats.js Benchmark in real Chromium too, and only call a row slower when the samples say so 2026-10-26 12:04:57 +01:00
release-notes.js Release notes: a story for big releases, and the 2.0 story 2026-10-30 16:28:19 +01:00
route-fuzz.js Differential random games: main's page and this checkout's play the same seeded game move for move 2026-11-01 21:44:30 +01:00
test-timings.js Faster tests, split everywhere: one sharded CI for pushes and releases 2026-11-07 07:24:09 +01:00
test.js Faster tests, split everywhere: one sharded CI for pushes and releases 2026-11-07 07:24:09 +01:00
weekly-architect.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
weekly-puzzle.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00
weekly-scenario.js Fix CodeQL code-scanning alerts 2026-11-05 21:24:26 +01:00