A rule (ip4), on in On-call and BGP at 3 a.m., off in the gentler
presets, sandbox and puzzles; scenarios only when they opt in. You start
with a /21 from the registry, sized so the early game never notices
(a gameplay-rules F1 test plays six start cities for 50 days). Business
customers need a block by kind and size; broadband homes take what is
left and the rest go behind CGNAT, which costs a box per home and
annoys some customers. An offer that does not fit cannot be signed and
says why, and a customer that cannot grow at renewal stays its size.
The bank's Address space section buys and sells blocks on a transfer
market with a gentle trend, leases blocks in, and leases spare blocks
out for monthly income, in real CIDR sizes (/24 to /16), at most 256
blocks (what a save keeps). Old saves get what they already use, plus
room, so nothing changes on load. The dashboard's AS box now lists the
blocks you announce.
A device preference (localStorage sot-theme, never in the save), applied
by a small script in <head> before the first paint, so there is no flash;
Auto follows prefers-color-scheme live, and a choice reaches other tabs
and the NOC window. Panels, HUD, drawers, toasts, modals, the phone tab
bar, charts, puzzles, the architect and Pie Control take their colours
from custom properties with night values (AA text contrast); light tints
keep their old colour as the fallback, so the light look is unchanged.
Both map renderers read a light and a dark palette (96-map/15-palette.js):
sea, land, clouds, coastlines, labels and the tube outline. A theme
switch repaints the cached layers once (the WebGL land buffers are
rebuilt once); nothing changes per frame. The multiplayer leaderboard's
own row and the menu rank badge follow the theme too.
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.
One sheet sets the target state for every POP, port and fiber: router
model and count, a second building, a generator, LAG members (split over
both buildings), an exchange port wherever there is one, PNIs spread
over the cities that pay, the line system, the fastest optics that reach
and wave sizes. S.popStd keeps its name; an old {g,rt} standard loads
with the same meaning.
One read-only plan prices every job with the game's own cost helpers,
POPs busiest first, then ports, then fiber hottest first. The sheet's
summary, the MCP quote, "Bring everything up now" and the new "Keep to
the build standard" order all use it, so the quote is what the click
spends. The order works a few jobs a shift through the budget and the
cash floor: a second router before a swap on a busy POP, no generator
under a nogen covenant, no De-Kicks, a line system swap only where the
fiber is quiet or a parallel link carries it, one a shift. New POPs get
the POP part of the standard, and the template's kit no longer pays for
it twice. opsMoNow counts generators and second buildings.
A new standing order, Upgrade optical transport. On fiber that is full
and runs above a level, it moves the line system up one size (the
Upgrade click), or trades the smallest lit channels for the biggest
optic that fits, one at a time (setChCount; the old optics go to
spares). With a line system chosen, every fiber below it is moved up,
both steps in one night if need be, cold or not.
A line system swap is a day without the fiber, so only where another
live path joins its cities, no customer rides it, and routing the
network without it serves as much as today (one compute, measured
against today's routing). One fiber is tested and swapped a night,
and a fiber that failed is left alone for a week (not saved), so the
order costs at most one routing more, and only on a night with a
fiber to try.
Keep routers ahead gets a Model setting: the next generation when busy
(as before), or a model to standardize on. With a model, every POP on a
smaller one is swapped to it, the busiest first, within the monthly budget,
through the same upRouter click: never a step down, only unlocked models
that fit, and only where a second router carries the traffic or nothing
runs yet. Busy POPs on it only get more routers.
Every setting in the Standing orders sheet (each order's dials, budgets,
the cash floor) is a dropdown instead of a button that steps through the
values. The change handler passes a select's data-args, the actions take
the picked position (v) and still step without one for the MCP tools,
which now declare v as optional.
The NOC intern loses the sales order. Saves that had it load cleanly: sanitize drops the order, its log lines and its
weekly tally, and an intern who was running it hands its switch and minimum to the sales desk (S.slAuto).
With someone at the sales desk, the player can let them sign offers once a game day and decline the ones under a
minimum (39-sales-auto.js), each in their own style: the engineer and the CEO sign after the #185 routing trial (one a
day, a misfit waits a week), the shark signs every offer whose POPs are up, promises and commission included, and the
CEO's declines are a handshake away. Orbit offers need room on their landing dish instead of a trial. Nobody at the
desk (the default; the CEO is a choice, not a given): every deal is signed by hand. The sales desk runs before the
intern's shift, so a deal signed today is in the loads the intern works from. The sheet shows the switch, the minimum
and this week's and last week's tally; the NOC gets one notice a week.
Orbit offers go through the desk too (99-pie-sales.js): they carry o.by, so commission, renewal haggles and each
one's mark at renewal apply. The engineer only offers where the landing dish has 1.5x room on a well-served POP, and
those customers renew like the nerds (0.5x leave). The shark rings airlines, cruise lines and the Mars mission first,
at the biggest size that fits and 25% more, and half of them get a full-sky promise (REQS.skyfull: a crust at 90%)
before there is one; they grumble down to 40 happiness and never cancel over the promise alone. The CEO plays every
other golf game with the Founder: the biggest orbit deal that fits, Mars first, at 30% off; jitters cut his orbit
prices by 0.4x the jitters and from 0.6 the Founder skips golf. Without a salesperson orbit offers are drawn exactly
as before (the O7 balance save has nobody at the desk: payback unchanged, 7.0 years on seed 7, 7.5 on seed 11).
Also: the scenario reference plays 'sales' as the CEO signing for you; the route fuzz leaves out the state and
buttons of a standing order only main still has; the intern's on/off dials (paid peering, keep a spare) show their
translated value in the shipped page instead of the raw label.
- Every 60 to 120 days while a rocket company exists (the first 90 days after the plan starts), the
Founder does something daft: a post, a gasp toast and a temporary effect (99-pie-jitters.js).
A once-a-game antic takes orbit billing down for 3 to 5 days (no orbit income, then a restore post);
a 3 a.m. spree (orbit offers x0.6 and a 4-point orbit mood dip for 14 days); a fight with a regulator
(a landing-rights spat via pieSpatStart in a country with a dish or rights, within the spat limit);
a leaked launch date (insurance 8% -> 14% for 30 days); Mars next year (offers x1.5 for 14 days, a
promise like the others whose slip cancels the unhappiest 2% of orbit customers).
- Market jitters (S.pie.founder.jit, 0..1): each antic bumps it, it fades by 1/30 a day, and while
high it lowers orbit offer odds (up to -30%) and holds orbit happiness under 100-25*jit (never low
enough to cancel at renewal). The Company tab shows one line and a small meter next to the feed.
- Rule O5: harm only with pieChaos(); with chaos off he only posts. Dice only with a company.
- Saves: new founder fields in pieBlank, repaired in pieSanitize (pieAnticFix); old saves load calm.
- Insurance button shows the current premium (pie.ins_on_p replaces pie.ins_on). Agent docs updated.
- pie-balance: compute() also reruns when orbit billing goes down or comes back.
- tests/pie-founder.test.js: each antic, decay, once-only billing outage, chaos off, saves, 360 px.
- NOC tab: Pie Control is a button in the top row next to "Open NOC dashboard" (only once the rocket
company is unlocked) and replaces the Pie in the Sky card; a spat waiting for an answer keeps its card.
The Connections button is gone (it lives in the NOC dashboard), and the traceroute moved into the
Routing & DDoS modal as an entry that opens the unchanged traceroute modal.
- Government money (Rural Digital Pie Fund, Pitcairn grant, Ex-Im Pie Bank) is a section of the bank,
shown with a rocket company or anything of the fund's to show. pieGovOpen, the action the toasts use,
opens the bank there; pieTab({t:'gov'}) does too.
- Pie Control has four tabs (Traffic, Company, Launch, Dishes) in one segmented control that fits 360 px,
styled like the HUD's speed buttons. The Founder's posts and the orbit books moved into the Company tab,
newest three posts shown and the rest folded. A stale UI.pieTab of 'gov', 'book' or 'founder' falls back.
- Agent docs for pieGovOpen, pieTab, routingOpen and connOpen; the route fuzzer drops connOpen from the
NOC tab on both pages to stay in lockstep with main.
- Tests: tests/noc-panel-layout.test.js, and the pie tests follow the moves.
Hidden coast was pushed onto the rim, so coasts on the edge shivered while the globe turned, and from some angles Eurasia's
fill ran the long way round and painted the whole globe green for a step (up to 47% of the picture flipping between two
half-degree steps). Each ring is now clipped at the horizon as map libraries do: the fill follows the rim in the ring's own
turning direction to the next point where coast comes back, and only real coast is outlined.
- Launch tab: each crust being filled says when it is full at today's pace (piePace: the pads that reach it, one launch per
leadDays(gap) each with the rocket last queued or the fastest available, capped by the factory with the shelf and the
queue as a buffer). Past two years and pad-bound, one nudge for another pad at the coastal POP nearest the equator,
with a build button (piePadTip).
- Patchy-sky customers (60-features/99-pie-patchy.js): a revenue line in pieMoney, no flows, so routing is unchanged and
games without a rocket company never see it. Up to $30M/mo for Shortcrust (scaled by crust size), ramping from 10% to
40% coverage with one working dish under the crust, then times (1 - pieCarry) so it hands over to regular orbit
customers by 60%. Shown on the Traffic tab; booked in S.pie.book like all orbit income.
- Dishes tab: under 30% coverage, a gentle note that dishes earn nothing yet and cost money every month.
- Payback on the O7 run is unchanged at one decimal (seed 7: 7.2 years, seed 11: 8.2).
A Gov tab in Pie Control with three state programmes:
- Rural Digital Pie Fund: reverse auctions for towns only orbit reaches
(a cut-off POP on backhaul, or a small town of your terminals). Ask
90%, 70% or 50% of the reserve against a rival; the lower ask is paid
monthly for five years while the town stays 70% served (monthly
average) from a 90-day deadline. One bad month warns, two revoke the
award and claw back half of the last year's support.
- Ex-Im Pie Bank: a BANKS loan of half the value of the pies flying and
booked (at most 20% of a full Shortcrust, counted by O7), 1.5-2.5%
over 60 months, never offered by the usual banks. Space covenants:
launch n pies in a year, keep a pie dish in the lending country. A
breach brings the bank's penalty, +3 points, a new launch deadline
and, with chaos on, a "data stays home" or landing-rights spat there.
- Pitcairn: served from orbit (backhaul or home terminals) at 90% of its
demand, latency forgiven, the UK pays a $120k/mo satellite grant.
Subsidies count in the orbit's books. tests/pie-gov.test.js covers the
features; pie-balance.test.js gains a run with government money, which
must pay back sooner by at most two years.
Rule O7's payback half is now played through the game loop
(tests/pie-balance.test.js): the big-network save runs a full lasered
Shortcrust by a sensible policy until its books balance, in 5 to 10 years
(6.3 on seed 7; 7.4 and 6.9 on seeds 11 and 3). The static formula is gone.
Retune: pies $0.5M (+$0.25M lasers), from $1M (+$0.5M); landing rights
$12,000 per eyeball up to $100M a year, from $28,000 up to $200M; orbit
rates x1.25 (pizza 25k, flywifi 36k, boat 27.5k, marsorb 44k); PIE_SELL
0.25 -> 0.4; PIE_OFFER_RATE 1/6 -> 1/3.
pieLand() prefers the nearest dish with room for the whole terminal and
only then the nearest with any room left, so a nearly full dish no longer
serves a sliver of a customer who then cancels while other dishes sit idle.
A crust carries a share of its traffic from 40% coverage, growing to all
of it at 60% (pieCarry/pieCap), instead of nothing until 60%. Pies wear out
over the last 30% of their life (pieAlive), deterministic, so a launch month
no longer deorbits on one day. Storms take 2-10% and food fights 5-10% of a
crust (PIE_HIT), down from up to 40% and 20%. Orbit customers lose at most
PIE_PATIENCE happiness a day without service, about a month to cancel.
The last six flights (UI only, never saved) replay on the globe every six seconds: a good one
spills its pies at the top and a reusable booster flies home; a failed one blows up partway
with a flash, smoke and debris. About 0.4 ms per frame while Pie Control is open.
The Traffic tab gets a Backhaul group (how full, where it lands, the ms
it adds, or why it is missing), the empty-sky checklist a backhaul item,
dish rows count backhaul; the globe draws backhaul as a sky arc,
highlighted on tap; the traceroute to and from a cut-off POP shows its
hops through space. Strings in every language; tests in
tests/pie-backhaul.test.js.
A pie dish at a POP the backbone does not reach now lifts all of that
POP's own traffic to a landing dish on the backbone (bent pipe within
1,000 km, lasers past that): one virtual edge, capacity min(dish, landing
dish, crust) after terminals, latency the orbit path. Its IGP weight is
Infinity; only the cut-off POP's paths are rerun with it (pieRelink), so
POPs on the backbone never route through orbit and saves without a
cut-off dish route exactly as before. Spats, safe mode, a down crust,
landing rights and backhoes cut it.
A cut-off dish now reports 'backhaul' or 'isl' (it said 'ok' when it
had local terminals). Rule O3 now reads: a cut-off pie dish carries only
its own POP's traffic and local terminals, never transit between other
cities.
A new first tab shows what rides the sky: a headline, load per crust,
who is riding (tap to highlight on the globe), per-dish load and why a
dish is idle, and a checklist when nothing flows. The traceroute lists
circuits through orbit with their uplink, laser and downlink hops.
Strings in all languages, tests in tests/pie-traffic.test.js.
The globe draws sky circuits as glowing arcs through the crust and
terminals as hops to their dish, width by Gbps, with packets moving
along; the highlighted flow goes on top. Dishes on the globe and the
map badge get a green/amber/red load ring.
R.pie now lists each terminal customer and sky circuit with its Gbps,
revenue, dishes and hops, plus load and an idle reason per crust and
dish. The fiber-only latency is worked out lazily, once per compute.
Routing is unchanged; saves without S.pie pay nothing.
Terminal customers are priced so that a full lasered Shortcrust on the
big-network save pays back in about 9.6 years, and no crust pays back in under
5 even with the whole sellable sky sold at the dearest prices (Shortcrust 5.3,
Flaky 7.4, Upper 9.2, Frozen 40). O2, O3 and O4 get rules and tests.
Homes and boats, airlines, cruise ships and the Mars mission (only in saves of
this version) call once a baked crust and a dish with room can serve them,
remote towns like Pitcairn and the Arctic first. What is signed never outgrows
a quarter of the sky's capacity. Orbit has its own sales desk, so the ground's
offers keep their odds.
Baked crusts become sky nodes in the routing graph: each dish on the backbone
gets an uplink, and with lasers dishes 3,000 km or more apart are joined through
space at c in vacuum, priced along the great circle at the shell's height. Only
latency-routed circuits fly (O4); IP traffic never sees orbit. Half-baked
crusts carry nothing, dishes carry at most their antennas (O2), dishes off the
backbone carry no transit (O3). Terminal customer types and their strings come
with it. Saves without S.pie add no work to compute().
Solar storms (safe mode saves most pies), food fights (debris, launches dearer for a year,
Space Roomba fix), rain fade on tropical dishes, backhoes at the dish, astronomers
(VisorSat or science customers sulk), the Founder's 3 a.m. posts and the chaos monkey
snipping laser links. Nine spats with two answers each on a bottom sheet: landing rights
refused, data stays home, spectrum squabble, kill switch, orbital land grab, jamming,
launch diplomacy, not over my airspace. All gated by chaos and 90 quiet days (O5),
seeded, repaired by sanitize, translated in every language.
An orthographic Earth on a 2D canvas (sticker look, plus a night view with stars,
city lights and terminator) showing a capped sample of each crust's pies, laser
links, pie-dish beams and launches. One rAF loop only while open (30 fps cap,
DPR <= 2, idle while hidden), nothing left behind once closed. Land comes from
LANDS_LL. The world map only gets a pink pie-dish badge at cities with a dish,
behind one null check per visible city when there are none.
Catalog (rockets, crusts, prices), state with newGame default and a full
sanitize repair, the one-time unlock on the Tier 1 win (sandbox from day 0),
company, factory, pads, R&D, launches, dishes, landing rights, the daily tick,
the Founder feed, three badges, a plain Pie Control modal from the NOC tab,
and hooks for routing, spats and the globe. Translated in every language.
The tutorial waited for a charter whenever one was due, also where the
picker is not shown (seeded tests); it now waits only while the picker is
open. Two tests still read the old wording for own subsea cables (level 9
or Tier 1 now), and the route fuzz signs the classic charter on both pages
when a normal game starts, so neither shows charter buttons the other
has not.
A new Normal game now asks what it is building before anything else, in
a popup that holds the clock and cannot be closed without an answer;
the tutorial waits for it. A save still in its first month that never
picked is asked on load. Sandbox, puzzles and scenarios never ask.
The Cable broker builds and lights glass from day one at the prices
everyone pays at the top level: dark fiber, every line system and optic,
digging without the pioneer markup, own subsea cables and their
upgrades, eight pairs, and every router those optics need. Everything
else unlocks by level as before. Its offers lean to carriers buying
waves and pairs, capacity conferences are open to it at any level, and
carriers call about three times a year with a capacity deal. It runs its
own ten-goal ladder and wins Glass Baron (own cables on five continents,
$1M a month of capacity sales), with a badge; Tier 1 stays its own win.
Classic and boutique networks may lay their own subsea cable from
customer level 9 as well as after Tier 1.
Rule M6 (gameplay-rules): a charter changes what you set out to do,
never what things cost. Closes#300.
Routing tried every PNI (rank 1) before any IX port (rank 2), like a
local-pref above peering, so a PNI in London pulled New York's traffic
across the Atlantic even with the same network at the New York IX. PNIs
now route at rank 2 with the IX ports, nearest first. At the same distance
the PNI goes first: an IX port counts as PNI_TIE (0.001) further away,
far below any link weight (at least 1). Distances compare as
(Da-Db)+(dta-dtb) so exits at one distance stay exactly equal, and the
POP-local shortcut skips lists that mix PNIs and IX ports. Backup only and
RouteScript's prefer pni keep their say. The traceroute, the reference
allocation in the tests and the RouteScript help follow.
Space set the clock to 0 or 1×, so a game at 4× came back at 1× after a
pause. Space and the phone's play button now share playPause(), which keeps
the last speed; autoPause() records it too, so a game loaded at a speed, or
paused by a window, resumes where it was.
A fabric (NNI) port comes in 10G, 100G or 400G, as fast as the router
takes and no faster than 400G, and bundles into a LAG of up to eight
members like transit, IX and PNIs. Each member takes a router port (10G
on a breakout, a quarter of one) and pays the monthly price; upgrading
moves and pays for every member. 10G and 100G keep their prices, 400G is
$3,000/mo. A model change that would strand a 400G fabric port is refused,
and saves drop fabric ports that make no sense.
The NNI requirement counted what the port already carried but not the
offer's own bandwidth, so an offer passed as long as the port was not
already over and auto-accept took customers that did not fit. It now
counts the offer too.
Closes#140, closes#307.
An own cable's map line came straight from its surveyed lon/lat path, so it
ended at the city's exact coordinates, while the city itself is drawn with its
display nudge (CITY_NUDGE). Fujairah's [1,2] left every own cable there 2 px
above the dot; Dubai, Karachi, Barcelona and Osaka are off by more. The ends of
the map line now sit on the drawn city, as commercial cables already do; the
saved path and its length are unchanged.
Floaters ("New POP!", payday money) live in FLOATS and fade on the map's
animation clock, which only runs while the game does. A new network
whose clock stands still (the agent's clock on the development page)
kept the previous network's floaters frozen over its map until a reload:
hundreds of them after a payday on a big network at 8x.
Each floater now records the network that raised it, and the map drops
any that belong to another one (new game, another slot, import, puzzle,
title screen). Same code for the 2D and WebGL maps.
- Values pasted into eval'd or inline-script code go through lit() (scripts/lib/js-literal.js), which escapes <, >, /, U+2028 and U+2029 after JSON.stringify
- build test and i18n-check read script tags with a DOM parser or a plain search, not HTML regexes
- mcp.js parses the Authorization header without a backtracking regex
- auto-release: pass step outputs to run scripts through env, not ${{ }} interpolation
- perf-comment: download the PR's perf artifact to RUNNER_TEMP, outside the workspace
- dev server: log errors to the terminal instead of sending stack traces in the response
- i18n-add/i18n-check: escape every regex metacharacter when building patterns from labels