seriesoftubes/src/game/93-ui
jvanvik 95aa9b6532 Multiplayer for self-hosted copies: sessions, server-side saves, a leaderboard
Off unless the page is built with MP_API set (MP_API=/api/mp npm run
build): a plain build has no door, no chip and makes no requests. The
session server is scripts/mp-server.js (npm run mp), plain node:http,
which can also serve the built site so one process sits behind the
reverse proxy; docs/MULTIPLAYER.md has the nginx and Caddy setups.

A session has a six-character code, one seed and one rules preset, so
every player starts in the same world, and up to twelve players with
their own AS numbers. Saves go to the server on a new game day at most
every 15 s and when the page hides, ordered by a sequence number (409 on
a stale push, and the player picks which one to keep). Tokens live in
localStorage, never in the save; the server keeps only their hash. A
#mp= link moves a network to another device. The session panel shows
the leaderboard, the feed and a short chat; each player's public card
(tier, POPs, links, exchanges, transit, peak, customers, score) carries
what in-game peering between players will need next.

Server limits: body sizes, one upload per player, uploads per address
and in total, sessions per hour, wrong-code lockout; addresses counted
per IPv6 /64, X-Forwarded-For only with --trust-proxy.
2026-11-07 00:42:39 +01:00
..
10-dom.js Charters: a popup at the start, and a third one, the Cable broker (#300) 2026-11-06 08:41:44 +01:00
20-phone.js Charters: a popup at the start, and a third one, the Cable broker (#300) 2026-11-06 08:41:44 +01:00
30-install.js Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
40-hud-and-panels.js Multiplayer for self-hosted copies: sessions, server-side saves, a leaderboard 2026-11-07 00:42:39 +01:00
45-core-panel.js Backbone rewards: L3VPN, flex-algo and slice customers, fast reroute, interop lab, four badges 2026-10-31 09:20:49 +01:00
46-routing-modal.js NOC tab and Pie Control tidied for phones: Pie Control in the NOC top row, traceroute in Routing & DDoS, government money in the bank 2026-11-06 09:58:00 +01:00
50-city-panel.js A build standard for the whole network, kept by the intern 2026-11-07 00:41:42 +01:00
52-pni-list.js Follow-ups to #276, #277 and #278 2026-11-04 08:11:03 +01:00
55-utilities.js Cache boxes share router ports: as many 100G boxes per port as its speed holds (closes #252) 2026-11-01 11:32:28 +01:00
57-ops-panel.js A build standard for the whole network, kept by the intern 2026-11-07 00:41:42 +01:00
58-sales-panel.js Deals belong to Sales: the intern sticks to the network, the sales desk signs deals for you, orbit ones too 2026-11-06 09:58:01 +01:00
59-build-standard.js A build standard for the whole network, kept by the intern 2026-11-07 00:41:42 +01:00
60-decommission.js A fiber given up keeps its optics: they go on the spares shelf (#229) 2026-10-31 07:15:35 +01:00
70-link-panels.js Charters: a popup at the start, and a third one, the Cable broker (#300) 2026-11-06 08:41:44 +01:00
75-optic-counts.js Add editable optic counts to fiber link panels 2026-10-27 20:30:20 +00:00
80-find-city.js Find a city: a search box in the HUD and on / that jumps the map there (closes #218) 2026-10-31 13:57:35 +01:00
82-keys.js Merge branch 'pr270b' 2026-11-03 12:10:19 +01:00
85-pie-control.js Pie in the Sky: the Founder's antics make markets jumpy, then it wears off 2026-11-06 09:58:00 +01:00
86-pie-traffic.js Pie in the Sky, the early game: a pace forecast on the Launch tab, patchy-sky customers before 40%, a hint to wait on dishes 2026-11-06 09:58:00 +01:00