Commit graph

201 commits

Author SHA1 Message Date
Frederic Jung
1e1864a173
Merge remote-tracking branch 'origin/main' 2026-10-27 20:55:26 +01:00
Frederic Jung
5a51b84bf7
Merge main
# Conflicts:
#	CHANGELOG.md
2026-10-27 20:48:57 +01:00
Frederic Jung
f80e491713
Merge remote-tracking branch 'origin/main' 2026-10-27 20:44:52 +01:00
Frederic Jung
4c499de742
Merge #158: smoother huge networks, map and autosave (huguesdelamure)
Capacity deals now record customer names with useName() too, and the
#156 CHANGELOG bullet moves to Unreleased where it belongs.
2026-10-27 20:43:46 +01:00
Frederic Jung
1f4b0af36a
Fix the padded yellow progress bars
The slow-city warning box used a plain .warn class, which also matched
the yellow .bar.warn progress bars and gave them its padding and
border. The box is .latwarn now; a test checks a yellow bar has no
padding.
2026-10-27 20:42:12 +01:00
Frederic Jung
b107d3fa03
Name São Paulo's exchange IX.brrr São Paulo like the rest of Brazil (#166) 2026-10-27 20:38:42 +01:00
Frederic Jung
c914f5d234
Merge #156: look fiber customers up by link id (huguesdelamure)
Kept the capacity deals from #168 in the fast path: fiber-pair contracts
count as a sold trench in fiberUse(), and pending deals still skip revenue.
2026-10-27 20:34:01 +01:00
Frederic Jung
0510df1816
Merge #174: Spanish translation (JMF-Alex)
Resolved CHANGELOG and README against main, translated the 26 labels added
since the PR branched, and added Spanish to the peering language loop.
2026-10-27 20:31:19 +01:00
Frederic Jung
6b04a530e8
Conference sponsorships and yearly capacity conferences with build-to-order carrier deals (#168) 2026-10-27 18:48:58 +01:00
Frederic Jung
239682720e
Allow up to 16 routers per POP, with a cage extension past six (#157) 2026-10-27 18:48:58 +01:00
JMF-Alex
288c78e9a0 feat: Spanish translation 2026-10-27 16:31:58 +01:00
Hugues
a3dd1dd810 Busy maps: no link labels or fiber dots above 1,000 lines on screen
On a save with 2,700 lines on screen, Firefox spent about 95% of each
frame painting, and the dotted line on lit fiber (~160 ms) and the link
labels (~55 ms) were half of it, in a tangle where neither can be read.

draw() now counts the lines it would paint (linesOnScreen(), same box and
margin as its own culling, boxes cached on the geometry) and above
MAP_BUSY = 1000 leaves out both. They come back as soon as fewer lines
show, zooming in for instance. The selected link keeps its label.

Firefox Developer Edition headless, 1600x900 at DPR 2, player save, median
of 3x9 frames: save view 414 -> 214 ms, pan 472 -> 238, zoom 0.6 269 -> 181,
New York zoom 2 213 -> 107, selected link 412 -> 201. Under the threshold
pixels are identical (canvas SHA-1): zoom 3.2 and 6 on the player save, six
views of the big-network fixture.
2026-10-27 14:03:04 +01:00
Hugues
22817c83c5 Remember each used customer name once
S.usedNames only answers "was this name used?", but every offer pushed its
name again, also once all names were taken: a 5,500-day save holds 560,345
entries for 129 names, 11.8 of its 22.4 million characters. Names are now
added once (useName), and sanitize() drops duplicates from older saves.

Player save, 30 days from load, against main: routing and the whole state
except usedNames identical, usedNames identical as a set; save 22.4 -> 10.6
million characters, first save in Firefox 95 -> 55 ms, JSON.stringify 68 ->
42 ms. Still over Firefox's quota on this save.
2026-10-27 13:45:06 +01:00
Hugues
d7301747f7 Saves too big for the browser: wait before retrying
A late-game save of ~22 million characters is over Firefox's localStorage
quota, so every save failed, yet the game rebuilt it with JSON.stringify(S)
every 5 seconds, every 10 days and after every action: ~95 ms each in
headless Firefox, 300-570 ms in a player's browser, all thrown away.

After a failed save the autosave now waits 1 minute before trying again,
then 2, 4, at most 5. A save that works resets this, so normal games still
save every time. Leaving the page, exporting, reloading for an update or a
language and a new game (a new S) still try at once.

Player save in Firefox: first save 95 ms as before, the next autosaves 0 ms.
2026-10-27 13:44:57 +01:00
Hugues
ecb862e70d Map of huge networks: fiber capacity once per frame, skip links off screen
draw() asked dfCap() three to five times per fiber link and per frame (width,
colour, label, up or down), each time over all its channels: on a save with
3,140 dark fibers of 18 channels on average that was about half of draw()'s
JavaScript. dfCap() now keeps its answers in DFC while one frame is drawn
(cleared in a finally, so a failed frame keeps nothing), and the link label is
built once per line instead of once per world copy. Links entirely above or
below the screen are skipped like those left or right of it already were.

Player save (202 POPs, 3,142 links), jsdom: draw() 40 -> 25 ms; perf-bench
"Map at three zoom levels" 89.7 -> 47.1 ms. Canvas call log identical at
every zoom without the vertical skip; Firefox pixels identical (SHA-1 of the
canvas) in 7 views. Firefox still spends ~95% of the frame painting.
2026-10-27 13:44:47 +01:00
Hugues
456062284f Faster days on big networks: look fiber customers up by link id
compute(), the daily mood check and new alien-wave/fiber-pair offers asked
S.links.find() or S.biz.filter() once per customer or per link. On a save
with 2,950 links and 18,000 customers (16,000 alien waves) that was ~150 ms
per compute, ~250 ms more per day, and ~650 ms when a wave offer spawned.

linkIds() and fiberUse() build the lookups in one pass; fiberOk, bizSf,
soldSlots, freeCh and pairFree take them optionally, and give the same
answers as before (first link with the id wins, sums in S.biz order).

Player save (202 POPs, 2,958 links, 17,967 customers), median of 15:
compute 323 -> 124 ms, dayTick 545 -> 133 ms, after 356 -> 149 ms.
Big-network fixture: unchanged. Routing results identical to main.
2026-10-27 12:26:10 +01:00
Frederic Jung
0057e74472
Ship short ids instead of labels; checker, tests and docs for labels
The build swaps every label for a short id in the shipped page, the inlined
English and the translation files (scripts/lib/compile-labels.js). Labels
passed to N_() stay whole because saves keep them. Against 1.33: page +4%
gzipped (321 -> 335 KB), translations -40% (it.js 143 -> 85 KB); routing,
day, panels, dashboard, map and boot time unchanged.

- i18n-check rejects labels the build cannot see (outside tr/trn/N_)
- tests/pages.test.js plays the shipped page in English, Italian and French
- docs/adr/0003, add-strings skill, ARCHITECTURE, README, CONTRIBUTING,
  CLAUDE.md describe labels
2026-10-27 11:27:11 +01:00
Frederic Jung
e817beed1a
Translations keyed by labels instead of English text
tr('pnis.delivery_2_to_6_weeks') instead of tr('Delivery: 2 to 6 weeks'): the
English lives once, in src/i18n/en.js (inlined into the page at build, so no
extra request), and it/pt/fr map the same labels. Changing English wording no
longer renames a key in every dictionary.

- 2,899 labels, made from where each text is used and its first words; short
  shared words are common.*
- plurals are one label with {one, other}: trn('label', n)
- static markup: data-i18n="label", data-i18n-aria-label, data-i18n-title
- saves from 1.33 and older stored English text in a few places; tr() still
  resolves it
- i18n-check: undefined/unused labels, markup drift, plural shape; i18n-add.js
  works on labels and --rename updates src/ too
- the old-branch port tool gives old English-keyed code and dictionaries the
  same labels
2026-10-27 11:05:09 +01:00
Frederic Jung
d0ba85ef8f
Merge main (peering policy) into the split layout via port-branch 2026-10-27 10:30:21 +01:00
Frederic Jung
a2e7e9dcc5
Peering policy (Open to all / Selective / Closed) and raise-all max-prefix
Open (default, as before): route servers count, and incoming requests
are accepted on arrival. Selective: 70% of the requests, answered by
hand, and route server sessions stop counting, so you request peers at
each IX yourself. Closed: no requests, reputation sinks to -6, and
customer offers arrive 40% less often. The IX panel says when your route
server sessions are off because of the policy.

"Raise all max-prefix limits" answers every alert at once; leaks among
them become route leaks as usual, and the toast counts them.
2026-10-27 10:23:47 +01:00
Frederic Jung
dbbbdaa1e3
Merge main (city density rule) into the split layout via port-branch 2026-10-27 10:23:42 +01:00
Frederic Jung
05ff4ea7ad
Docs and guard rails: GitHub Pages only, where code goes, updated skills
- docs/adr/0001: GitHub Pages is the only host, not open for renegotiation
- docs/adr/0002: source in many files, shipped as one page assembled at build
- tests/pages.test.js: builds stay static files Pages can serve, all local
  references resolve, only release.yml deploys and only via the Pages actions
- tests/build.test.js: partial naming and layout rules
- new skills: github-pages, edit-the-game; add-strings, performance, release
  and write-tests updated for src/, sorted dictionaries and --base-ref
- CLAUDE.md, ARCHITECTURE.md, CONTRIBUTING.md (incl. porting older branches),
  README.md and the PR template describe the new layout
2026-10-27 10:15:12 +01:00
Frederic Jung
3d469d9a93
City density rule: retire 15 crowded Brazilian cities from new games
A small city (P < 60) may not sit within 300 km of a bigger city in the
same country unless it is a cable landing or a capital (Canberra gets a
capital flag); a test enforces it everywhere. The 15 Brazilian cities
that broke it get off:true: still in the data so saves keep their POPs,
routing and links there, but new games do not draw them, offer them to
customers, list them in network presence, or let you build a POP there.
Brazil goes from 40 to 25 cities (Europe has 44). Order and Progress now
needs 15 IX.brrr ports.
2026-10-27 10:09:12 +01:00
Frederic Jung
67a40942b4
Split the game page into partials under src/, assembled into one index.html at build
site/index.html (900 KB of HTML, CSS and JS in one file) becomes src/: a shell
(src/index.html), styles/ and game/, concatenated in path order by
scripts/lib/page.js. The assembled page is byte-identical to the old file, so
load time and in-game performance are unchanged.

- scripts/build.js replaces build.sh (same env vars, same output)
- npm run dev: a zero-dependency dev server that assembles on every request
- tests assemble the page in memory; npm test runs every tests/*.test.js
- perf-bench takes --base-ref to build a git ref's page
- scripts/legacy/split-index-html.js is the splitter, kept for older branches
2026-10-27 10:05:56 +01:00
Frederic Jung
1b691ca9af
Supply chain: hardware prices drift up, shortages come and go, spares and price locks
hwMul() scales new purchases of routers (routerCost, swapCost), optics
(optCost, on top of tariffs) and own builds (dfBuildCost, ownCabCost):
free for 180 days, then +4%/year, capped at +30%. Monthly costs of what
you own do not move.

Shortages are a new random event after day 180, never two at once:
optics +50%, routers +40% or builds +30%, for 45-75 days. Counter-moves:
stock spare optics from a dark fiber link at today's price, or buy a
365-day price lock from the NOC (80k + 30k per POP, double during a
shortage), which freezes today's trend and ignores shortages.

Measured on a 16-POP European network ($530k/mo revenue): the curve
adds ~5% of revenue a year in year 1 and ~23% by year 5 if every dollar
is reinvested in hardware; a lock costs about a month of revenue.
2026-10-27 09:25:47 +01:00
Frederic Jung
1c42c41df0
PNIs: usually a month, 15% stuck for 6-12 months; routes sometimes sold out of a wave size
Big-network PNIs and augments now take 30 days, with a 15% chance of
6 to 12 months (still halved at a conference). Help and order text say
so.

Leased waves can be sold out on a route for a while: a stable verdict
per route, cable, size and 90-day window (2% for the smallest, rising
to 10% for the biggest), with a reason. The link window greys out sold
out sizes with the days left. Never in the first 90 days or the
tutorial.
2026-10-27 08:54:12 +01:00
Frederic Jung
fbd0f133ba
Don't repeat the city after an exchange that is named after it (#134)
IX.brrr Campinas, Equinox Ashburn IX and friends already say where they
are, so peering tips, IX LAG labels, the max-prefix leak incident, the
de-peering toast and the route server hint drop "in {city}" for them.
2026-10-27 07:30:02 +00:00
Frederic Jung
813e8d95e3
Merge pull request #142 from LookedPath:fix/subsea-upgrade-scheduling 2026-10-27 07:19:21 +00:00
Frederic Jung
28036a7be2
Merge pull request #146 from andrewnyr/feat/crowdflare-rackstar 2026-10-27 06:44:43 +00:00
Frederic Jung
b7dcd3177b
Merge pull request #143 from huguesdelamure/stack-alien-wave-contracts 2026-10-27 06:44:26 +00:00
Frederic Jung
e5d7c1406b
The South Island joins the map, old Australian saves hear what changed, crowded POP names wait for zoom
Christchurch (Garden-City-IX) and Invercargill on the South Island, which
had a coastline but no land to build on. Cook Strait Talking from Auckland
to Christchurch, and Lord of the Tasman Rings from Invercargill to Sydney,
Melbourne and Auckland, after the planned Tasman Ring Network that lands at
the Southland data centre campus. Kea, sandflies, post-hole diggers, ferry
anchors and the smelter's grid.

Saves with Australian POPs from before #148 get one notice: pricier transit,
fewer sellers, and Telstraya and Floptus sessions at the exchanges ended.

A POP name that would land on another name hides until you zoom in, unless
it is selected, hovered or home.
2026-10-27 07:22:31 +01:00
Frederic Jung
65a7135983
Down Under: upside-down routers, BrisVegas, Next-Door-DC and everything trying to kill you 2026-10-27 07:05:03 +01:00
Claude
c73665a1bc
Merge pull request #147 from mxhob1/broadband-price
The broadband panel shows each city's real price per gigabit

# Conflicts:
#	CHANGELOG.md
#	site/index.html
2026-10-27 07:05:03 +01:00
Michael Hobl
3e65215608
Start in Sydney on hard mode: Australian pricing, carriers and exchanges that follow PeeringDB, Adelaide, Canberra and Hobart, new cables, Australian outages and the Fibre to the Basement scenario 2026-10-27 13:05:34 +10:00
Michael Hobl
33d23c1fe4
The broadband panel shows each city's real price per gigabit and real revenue, not the base rate 2026-10-27 11:56:55 +10:00
Andrew Asciutto
e353040899 Add Crowdflare Rackstar embedded caches 2026-10-26 20:33:20 -05:00
Hugues
542b61c581 Stack a carrier's alien waves on one fiber into one contract
Every broker sale of 1-4 alien waves became its own customer, so a large
fiber-resale business grew to tens of thousands of tiny contracts. A real
save reached 124,966 alien-wave contracts and 49 MB: localStorage stopped
accepting it (save() swallows the quota error) and every compute() walked
the whole list.

A carrier that already rents waves on a fiber now grows its contract:
slots, monthly rate and the description add up. migrate() folds older
saves the same way, keeping the unhappier mood and the earliest start.
The same spectrum is sold and the same revenue is billed.

On that save: 124,966 -> 2,190 contracts, 49.3 MB -> 4.2 MB.
2026-10-26 23:48:34 +01:00
LookedPath
2a83892de8 Fix subsea upgrade scheduling and add one-click construction rush 2026-10-26 22:47:13 +00:00
Frederic Jung
e7fcb041be
Merge main
# Conflicts:
#	CHANGELOG.md
#	site/i18n/fr.js
#	site/i18n/it.js
#	site/i18n/pt.js
#	site/index.html
2026-10-26 23:34:24 +01:00
Frederic Jung
68b3d0b839
Far-away transit backhaul is slow, and slow is bad service
Each transit flow's backhaul round trip over your own links (2× the path
latency to the exit) now affects service: free up to 20 ms (~1,500 km),
up to 20% worse at 50 ms, and half the service value past 50 ms. sfOf()
multiplies delivery by it, so revenue, broadband growth and business
customers all feel it. Peering, PNIs and caches are exempt.

City panel chip and Transit-tab warning name the far exit and the round
trip; the NOC lists slow cities. Two tests updated: Moscow on Frankfurt
transit is still fully delivered but now slow, and the Red Sea test pins
Asian demand that would otherwise churn away on Marseille transit.
2026-10-26 23:29:49 +01:00
Frederic Jung
37038e922d
NOC notifications: the last 10 minutes, readable, foldable and openable
The NOC's 'Recent events' (S.log) becomes the notification inbox instead of
a separate one. Entries now keep a wall-clock time, a title, a repeat count
and what they are about, and the NOC shows the last ten minutes right after
the incidents rather than at the bottom: title, short text, 'n min ago',
x N for repeats within a minute, and Open.

Open targets come from the notice itself (incidents via their ref, DDoS,
badges, goals, exchange ports and sessions, resolved incidents), then from
its own navigation button, then from the city or link its text names; 45 of
46 notices in a 60-day test game get one. A link or customer that is gone
says so. Unread counts show on the NOC chip and the phone NOC tab (not red:
red stays for incidents). Entries are validated in sanitize().
2026-10-26 22:56:44 +01:00
Frederic Jung
4643adb2ea
Merge main
# Conflicts:
#	package.json
#	site/i18n/fr.js
#	site/i18n/it.js
#	site/i18n/pt.js
2026-10-26 22:42:18 +01:00
Frederic Jung
8db8cb1f7a
Peering inbox, PNI lead times and minimum sizes, Microsnoft US East
Peering inbox (Networks tab): requests from small and made-up networks
arrive with every IX port, max-prefix alerts take bilateral sessions
down for a few weeks unless answered (raise the limit for growth, keep
it down for a leak; raising it on a full table is a route leak).
Unanswered mail costs reputation, which makes selective networks up to
10% pickier. The Large Peering Model agent costs $20M a year and gets
about a third of its decisions wrong, with a log to prove it.

PNIs are ordered, not instant: 2 to 6 weeks for small networks, 6 to 12
months for big content networks, Tier 1s and big eyeballs, for new PNIs
and augments alike (halved during a conference). Content networks and
Tier 1s start at 100G; Doitsche Telekomm sells 1G. Microsnoft refuses
PNIs and IX sessions in Ashburn, New York, Boston, Atlanta and Miami.
Only delivered PNIs carry traffic, bill, or count for goals and Tier 1.
2026-10-26 22:37:51 +01:00
Frederic Jung
56f2d446ea
Sea routing: Suez and Panama crossings, great circles, fastest design back on par
After #133 the coastline router treated Egypt and Panama as solid land, so
Marseille–Singapore sailed round Africa (21,440 km instead of 12,175) and
Miami–Lima round Cape Horn (17,700 km for a 4,220 km hop). Real systems
cross both by land: Port Said to Suez beside the canal, and Panama
(PAN AM). These are now overland edges in the sea graph, priced as the
distance they cover. The Red Sea Crisis shuts Suez, and routes are cached
per set of open passages, also in the survey worker.

Long open-water legs follow the great circle where it stays at sea,
instead of a straight line on the map. The low-latency design may land
further off and backhaul overland, and may follow the corridor of the
fastest in-service cable on the pair when that is shorter, so it matches
Hibernia again (London–New York 25.3 ms, Halifax–London 20.9 ms) and
beats cables that take detours (Lagos–Bude 32.2 against 37.6 ms).

Tests: main's expectations restored where #133 had loosened them
(Marseille–Singapore needs no upgrades, New York–Sydney needs terminals,
express equals the fastest cable); the marine check knows the passages;
new checks for Suez, Panama, the crisis and the corridor rule.
2026-10-26 22:13:16 +01:00
Frederic Jung
656e904e05
Merge #133: route new subsea cables around coastlines 2026-10-26 21:52:59 +01:00
Frederic Jung
682b6c99f4
RouteScript: AI button, help page and ready-made scripts
The editor gets a help page (how exits are picked, the workflow, every
rule with its real-router equivalent) and seven ready-made scripts
filled in from the live network: Shields Up, Customer Care, Peering
First, Penny Pincher, Prepend Diet, Maintenance Window and Keep Calm.

Slop it with AI dry-runs its favourite recipes against live traffic,
keeps the best, and signs it with a pun-named model and a confident
remark. The glossary mentions RouteScript too.
2026-10-26 21:44:59 +01:00
Frederic Jung
ab079e70dd
Atlantic islands and Halifax: real landings and shorter crossings (#120)
Halifax, Bermuda, Ponta Delgada (Azores), Tenerife, Praia (Cape Verde)
and St Helena, the islands each their own landmass with outlines on the
map. Exchanges only where one runs today (CVIXP in Praia, HFXIX in
Halifax); none in Bermuda, the Azores, the Canaries or St Helena.

Cables follow real landings: new pairs on Hibernia Express (Halifax),
Nuvem (Bermuda), Columbus III (Azores), EllaLink (Cape Verde), Equiano
(St Helena), SAT-3, ACE, 2Africa and WACS (Canaries, WACS also Cape
Verde), existing pairs untouched so saves keep their links. New: Sol
(Florida, Bermuda, Azores, Santander), Atlantis-2 (Las Toninas,
Fortaleza, Praia, Dakar, Tenerife, Sesimbra) and Canalink as puns.

Crossings just over the 6,000 km 1.6T reach now split at the islands:
Miami-Madrid, Atlanta-Lisbon, Lisbon/London-Lagos and Fortaleza-Madrid
go from 1.2T to 1.6T per wave hop by hop.

Island networks with Tier 1 upstreams (One Communications, CV Telecom,
Sure South Atlantic, Eastlink as puns), MEO in the Azores, Bell in
Halifax, Bermuda Triangle cuts, and the Mid-Atlantic Accent scenario.
Broadband in a town smaller than 8 Gbps now starts at its ceiling
instead of above it.
2026-10-26 21:17:21 +01:00
Frederic Jung
673b5159b0
Zoom in further, and pick short links between close cities (#126)
Porto Alegre and Florianopolis are 65 px apart at the old maximum zoom,
and each city grabbed taps within 38 px, so the link between them could
not be selected at all. The maximum zoom goes from 6x to 16x (city icons
stop growing at 1.35x, so dense regions spread out), and a city now wins
a tap outright only on its icon; in the rest of its tap circle a link
right under the pointer wins. The hover cursor follows the same rule.
Dragging from a POP still draws a new link.
2026-10-26 20:42:01 +01:00
LookedPath
8ac420c4c8 Route new subsea cables around coastlines 2026-10-26 19:33:08 +00:00
Frederic Jung
18f3936058
Sell spare dark-fiber capacity from the fiber itself (#51)
Wholesale alien waves and spare-pair leases already existed, but only as
random offers, and the fiber only said how many channels were sold. Each
dark fiber in service now has a 'Selling spare capacity' section: free
channels, who rents what and for how much, a pending offer with Accept,
and 'List it with a capacity broker', which creates an offer for that
fiber at once at the usual price minus a 10% broker cut (alien waves on
free channels first, then a spare pair in your own trench). One listing
per fiber at a time. Random offers use the same helpers and draw the same
random numbers in the same order, so seeded games are unchanged.
2026-10-26 17:47:51 +01:00