seriesoftubes/src/game/80-simulation
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
..
10-dijkstra.js Routing keeps its structural tables between calls and runs its hot loops as small functions, identical results 2026-11-01 19:04:17 +01:00
20-routescript.js PNIs and IX ports are both peering: traffic leaves at the nearest one (#298) 2026-11-06 06:31:21 +00:00
25-ddos-flood.js DDoS rework (#242): world-sized floods on customers, spread over every port, RTBH per target, Flowspec rule budgets, magnet scrubbing, new NOC card 2026-10-31 12:20:14 +01:00
25-direct-egress.js Prefer keeps the say at its own POP only, and the direct ranks stop slowing the game day 2026-11-01 20:07:23 +11:00
28-route-worker.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
29-route-cache.js PNIs and IX ports are both peering: traffic leaves at the nearest one (#298) 2026-11-06 06:31:21 +00:00
30-compute.js Pie in the Sky: no government line in the books without a rocket company, so other games route exactly as on main 2026-11-06 09:57:51 +01:00
35-pie-paths.js Pie in the Sky: the Founder's antics make markets jumpy, then it wears off 2026-11-06 09:58:00 +01:00
40-billing.js Fabric ports at 10G, 100G or 400G, in LAGs; fabric customers only when they fit 2026-11-06 06:52:48 +01:00
50-sanitize.js Lambda Bazaar: a capacity market for your dark fiber 2026-11-07 13:34:41 +01:00
60-requirements.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
70-customers-and-events.js Pie in the Sky: routing through orbit 2026-11-06 09:57:39 +01:00
75-customer-lifecycle.js The sales desk answers renewal haggles, each salesperson their way 2026-11-06 20:56:50 +01:00
80-geography-and-latency.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
90-sites-and-service.js Backbone technology: plain IGP, LDP, RSVP-TE, SR-MPLS, SRv6; two new RSVP-TE routers 2026-10-31 08:27:31 +01:00