Commit graph

189 commits

Author SHA1 Message Date
Frederic Jung
a1f895d754
PNI upgrade buttons show the monthly fee too (#110)
After #115: upgrading an existing PNI, in the Peering tab and in the NOC's
connection list, also showed only the one-off cost. Both now read
'Upgrade 100G $2.3k + $350/mo', like transit. The two old labels without a
monthly part are no longer used and leave it.js and pt.js.
2026-10-26 15:01:07 +01:00
Frederic Jung
afc5ba3c37
Merge #115: PNI buttons show the monthly port fee next to the setup cost (#110) 2026-10-26 14:52:40 +01:00
clayberF
497f970eac PNI buttons show the monthly port fee next to the setup cost (#110)
The buy buttons only showed the one-off setup (1500 + setup/2), so a
$1.8k cross-connect read like a monthly bill, while the real monthly
fee (PORT[i].pni) was shown nowhere. Reuse the existing translated
'{port} <small>{cost} + {mo}/mo</small>' label, like transit and IX.
2026-10-26 10:16:43 -03:00
Frederic Jung
b0684bca82
Pacific islands, faster routing on big networks and five fixes (1.30.0) 2026-10-26 14:02:43 +01:00
Frederic Jung
a164b512ba
Pacific islands: twelve cities, island landings and faster transpacific hops
Honolulu, Guam, Koror, Majuro, Port Moresby, Honiara, Noumea, Suva,
Nuku'alofa, Apia, Pago Pago and Papeete, each its own landmass with its
real outline on the map. Exchanges only where one runs today (DRF IX,
Guam IX, Fiji-IXP, CAN'L IXP, Solomon Islands IX); PNG and Tonga have
none active, Samoa's is still planned.

Cables follow real landings: new pairs on Southern Cross, Hawaiki, AJC,
JGA, Bifrost and Humboldt (existing pairs untouched, so saves keep their
links), plus SEA-US, AAG, Echo, HANTRU-1, Coral Sea, Gondwana-1, Tonga
Cable, Tui-Samoa, ASH, Honotua, Manatua and SX NEXT as puns.

Subsea waves have no regens, so a POP on an island splits a crossing into
shorter spans: California-Sydney 400G -> 1.6T per wave via Honolulu and
Suva, LA-Hong Kong/Manila 400G -> 800G via Guam, Santiago-Sydney
400G -> 800G via Tahiti (1.2T on own fiber). LA-Tokyo stays 800G leased:
Honolulu-Guam is just over the 6,000 km 1.6T reach.

Twelve island networks, all with Tier 1 upstreams so Tier 1 players keep
their reach. PacNOG in Suva, unreliable power in Guam, Port Moresby and
Honiara, volcano cuts for Tonga, and the Stepping Stones scenario
(1.6T hop by hop from Los Angeles to Sydney).
2026-10-26 13:42:21 +01:00
Frederic Jung
4682f16730
Routing makes far less garbage: no temporary arrays or closures in its hot loop
The group split runs over an index range with one scratch array instead of
map/reduce/forEach and slice, leftover exits go into one reused array and are
sorted in place (insertion sort for short lists; both sorts are stable, so
the order is the same), flows are split without per-flow arrays, and the hot
loops use indexes instead of for...of. Without Auto-TE, exits whose path is
already full are not called at all. One routing pass on the big network
allocates 23 MB in Chromium instead of 66 MB.

Routing results are identical. The speed test's plain path now also uses the
original group split and sort, and a new test routes around a full 10G link
with Auto-TE (and a spill script) and compares both paths; planted bugs in
the split, the sort and both full-path skips are caught.

Big network vs main, two runs: headless routing -23% to -30%, Chromium
desktop -14% to -27%, phone -15% to -27%. Steps 2-4 together vs c76dd4d:
Chromium desktop routing -49%, phone -34%, a game day -26% and -30%.
2026-10-26 13:41:13 +01:00
Frederic Jung
2c0d69379a
Routing skips paths that are already full and finds the nearest exit in one scan
Capacity only shrinks while traffic is routed, so a path with one full link
or node fits nothing for the rest of the pass: push marks it and later tries
return at once (92% of pushes on the big network went into such paths). The
nearest group of exits is found in one scan instead of two, and exits that
filled up are dropped from the shared lists once a quarter of a list is full.

Routing results are identical to before. The speed test's plain path now also
runs without these, with Auto-TE and with a RouteScript that keeps headroom on
every link; planted bugs in each of the three are caught.

Big network vs main, two runs: headless routing -51% to -58%, Chromium
desktop -22% to -31%, Chromium phone -15% to -29%.
2026-10-26 12:35:15 +01:00
Frederic Jung
c76dd4d556
Benchmark in real Chromium too, and only call a row slower when the samples say so
npm run perf -- --browser times the same workloads in Chromium as a desktop
and as a phone (390x844 at 3x, CPU slowed 4x), one browser per version. Each
run collects garbage first and ends by forcing layout and the map canvas, so
deferred work counts. The jsdom DOM is about 30x slower than a browser's and
has no layout, so the interface rows need this.

Shared machines swing single runs by 30% on identical code, CPU time
included. A row now counts as slower or faster only when it moved 15% and a
Mann-Whitney U test gives p < 0.01 (15 runs a side by default). Identical
code: no flags in three full runs; a routing slowdown planted in a copy is
flagged in jsdom and on the phone.

The panel workload renders both selections every run instead of alternating,
which split its samples in two. CI drives the runner's Chrome through
playwright-core, no browser download.
2026-10-26 12:04:57 +01:00
Frederic Jung
c88bad3eef
Let the 3.2T transponder fall back to 1.2T like the 1.6T one (#107)
Its fallback ladder skipped 1.2T, so between 4,000 and 5,500 km on land
(6,000-8,250 km subsea) it carried 800G while the cheaper 1.6T optic
carried 1.2T. A test now checks that a bigger optic on the same line
system never carries less than a smaller one at any distance.
2026-10-26 10:28:28 +01:00
Frederic Jung
92b24fd2ad
Label mixed-size parallel waves per size instead of N × total (#56)
800G + 400G on one route was drawn as "2 × 1.2T", which reads like two
1.2T waves. Mixed groups now list each size, largest first, e.g.
"2×800G + 400G"; equal sizes keep "4×800G".
2026-10-26 09:23:57 +01:00
Frederic Jung
3cd30aa473
Fix five bugs: unlightable cables, own-IX sites, idle router swaps, loan badge, cable-less cities
- #88: own subsea cables longer than the best subsea optic reach are refused
  with a reason; cancelling one mid-build refunds 75% of the unlaid part, and
  an unusable one from an old save is refunded in full.
- #36: your own IX picks building A, B or both (second switch, +50% fabric
  fee) instead of showing site and LAG buttons that did nothing.
- #105: no maintenance window or incident when swapping the only router in a
  POP nothing depends on yet.
- #104: declining a loan redraws the top bar and saves.
- #50: a city with no cable landing names the nearest landing station.
2026-10-26 09:12:01 +01:00
Frederic Jung
f1322f2cd2
Africa, Brazil, Portuguese and a faster game on big networks (1.29.0) 2026-10-26 08:49:19 +01:00
Frederic Jung
e5deb90968
Routing reference test runs on today's routing loop; perf bench reads exported saves
The reference test from #106 now patches the loop as it looks after #96
(business-first passes) and also covers prefer, prepend and protect
customers. It catches an exit index that ignores RouteScript preferences,
which the shortcut test in speed.test.js cannot see.

npm run perf -- --save accepts files from the in-game Export save, so
scripts/benchmark-performance.js and its README section are not needed.
The performance skill documents --save, both equivalence tests and how to
handle noisy runs.
2026-10-26 08:40:20 +01:00
Frederic Jung
2366bb9a8f
Merge #106: routing reference test and save-file benchmark 2026-10-26 08:34:19 +01:00
Frederic Jung
04626cf1a9
African networks buy transit from Tier 1s
Liquid Lunch, Sea-Comedy, Angle-a, Djibouti Calling, Empty-N, Air-Tell,
Ethio-Tele-Calm and Atlas Shrugged get upstreams, so a Tier 1 with PNIs to
the other Tier 1s still reaches everyone, and their traffic stops falling
through to transit (routing on the big network: +10% to +1% vs main).
The Africa changelog bullet now opens with a short first sentence.
2026-10-26 08:13:12 +01:00
Frederic Jung
9303740311
Merge #93: Africa, twenty-one more cities, seven cables, border costs and Cape to Cairo (Portuguese for the 41 new strings) 2026-10-26 08:03:30 +01:00
Frederic Jung
97e3a70f87
Advertise the Signal group in the game and on GitHub
A chat card in the menu and How to play, a footer link on the title screen
(Italian and Portuguese included), plus README, CONTRIBUTING and a contact
link in the issue chooser.
2026-10-26 07:41:50 +01:00
Frederic Jung
207426f61c
Latin American networks buy transit from Tier 1s
Without an upstream, the seven networks from #92 could only be reached by
peering in Latin America, so every Tier 1 would lose reach (and the
title) once the courtesy route for new networks ran out.
2026-10-26 07:28:36 +01:00
Frederic Jung
a44ff68186
Merge #92: Brazil's forty IX.br locations and twelve more Latin American cities
Portuguese for the 52 new strings.
2026-10-26 07:22:42 +01:00
Frederic Jung
1473fb0627
RouteScript optimizer: smarter tips after #96
Suggest protect customers only where IP customers would get unhappy
(under 95% served): it costs a second routing pass, about +65% on a big
network. Point at the exchange the network actually peers at, where you
have no port yet, instead of the city's main IX. And the draft admits it
has never been paged at 3 a.m.
2026-10-26 07:14:21 +01:00
LookedPath
ffb8c50895 Add routing reference regression and exported-save benchmark 2026-10-26 06:11:12 +00:00
Frederic Jung
1858098a4d
Merge #96: RouteScript local-pref, AS-path prepending, protected customers and an optimizer
Ported onto #89's routing loop: the prepend share is its own transit exit,
local-pref and prepending get their own ranks, and protect customers runs
business flows through every rank before home users. Portuguese for the
five new strings.
2026-10-26 07:01:33 +01:00
Frederic Jung
308c3f7045
Performance benchmark on a big network, posted on every PR
scripts/perf-bench.js times routing, a game day, an action, panels, the
NOC dashboard and the map on tests/fixtures/big-network.json (104 POPs,
950 PNIs, 832 caches), base and head in alternating turns, and says
whether routing results changed. perf.yml runs it on every PR against
the base; perf-comment.yml posts the table as one updated comment.
New performance skill, CLAUDE.md rule, PR template and docs.
2026-10-26 06:39:23 +01:00
Frederic Jung
ad8b1bebcb
Portuguese: the four counter strings added after #91 was branched 2026-10-26 06:18:38 +01:00
Frederic Jung
6f765b2088
Merge #91: Brazilian Portuguese translation 2026-10-26 06:13:35 +01:00
Frederic Jung
4e95b9b397
CI: translation coverage job
A separate 'translations' job runs the i18n checker on every push and
PR and writes a coverage table per language to the run summary, with
the missing, broken and unused keys listed. The checker now also fails
when a language file is not offered in SOT_LANGS or cached in sw.js.
2026-10-26 06:04:28 +01:00
Frederic Jung
0ecce20dec
Test that #89's fast routing matches the plain path
Builds a copy of compute() with the own-exits shortcut, the first-group
scan and the per-network exit index switched off, and compares both on a
busy network with Auto-TE, preferred and backup exits, two upstreams per
city, route servers and two cache boxes per CDN. Verified it fails when
either shortcut is deliberately broken.
2026-10-26 05:56:15 +01:00
Frederic Jung
4a6af1a348
Merge #89: make big networks fast (routing, panels and map drawing) 2026-10-26 05:43:22 +01:00
clayberF
14ae22cee9 RouteScript: local-pref, AS-path prepending, protected customers and an optimizer
- prefer/avoid transit PROVIDER: per-upstream local-pref (ranks 2.9 and
  3.5, so never ahead of peering).
- prepend transit PROVIDER 1-3: moves 35/60/75% of that upstream's port
  to a last-resort share. Prepending is a hint, not an order.
- protect customers: business flows take every rank first, and IP
  business customers are judged on their own served share.
- Optimize: drafts a script from live traffic (spill, protect, cheapest
  and priciest upstream) plus comments for IX and PNI opportunities.
2026-10-25 23:15:24 -03:00
clayberF
bca2858c89 Africa: twenty-one more cities, seven cables, border costs and Cape to Cairo
Cities in nineteen countries, each with a pun IX and a country code (cc).
Overland fiber between two African countries costs 2x. Kinshasa, Lusaka
and Harare get blackout, Durban load shedding.

Cables follow real landing points (submarinecablemap.com): ACE, SAT-3,
MainOne, Maroc Telecom West Africa, SAIL, SEACOM and DARE1 as puns, plus
new pairs on 2Africa, WACS, Equiano, EASSy, TEAMS, PEACE, AAE-1, Glo-1,
Medusa and SACS. All pairs are drawn from one sea track around Africa.
Existing pairs are untouched, so saves keep their links.
2026-10-25 22:27:59 -03:00
clayberF
9cde4c432c All forty IX.brrr locations and twelve more Latin American cities
Brazil gets every IX.br location (ix.br/localidades/atuais), each with a
cheap nonprofit IX.brrr. Overland fiber into the Amazon costs 2x. New
national networks (Oi Oi, TIM-TIM Mobile, Brisanada) and a scenario,
Order and Progress: ports on 20 IX.brrr exchanges including Manaus.

Latin America: Montevideo, Asuncion, Cordoba, La Paz, Quito, Medellin,
Caracas, Guatemala City, San Jose, Queretaro, Monterrey, Guadalajara,
with Moviestar, Liberty Latte America, Antelope and Tiger Mobile.
SAm-1 gains a Salvador landing and Tannat a Montevideo one (new pairs
only, so old saves keep their links).

Dense clusters are spread apart with display-only CITY_NUDGE entries;
Rio no longer needs its old nudge, which put it north of Vitoria.
2026-10-25 22:15:48 -03:00
Frederic Jung
47c7c19402 Rest the map while the dashboard covers a phone screen
On a phone the NOC dashboard, scrolled past its top edge, fills the whole
screen, but the map underneath was still drawn every frame: about 4 ms per
frame on a big network on a fast PC, several times that on a phone. While a
panel covers the map completely it is no longer drawn, and it comes back as
soon as any of it shows. At the top of the dashboard the strip of map above
the card keeps moving, and on desktop, where the map shows around the
dashboard, nothing changes. No payday floaters are made while the map is
hidden, so they cannot pile up out of sight.
2026-10-26 02:00:33 +01:00
clayberF
6d145faa25 Add Brasília, Belo Horizonte, Curitiba and Porto Alegre
Four more Brazilian cities, each with an IX.brrr exchange (nonprofit, cheap
ports) and provedor offers. Clarovision and Viva Vivo serve them, and
Capybara Connect stops in Porto Alegre. The Samba Peering achievement now
names its three exchanges instead of saying "all three".
2026-10-25 21:44:19 -03:00
Frederic Jung
e026836169 Rest the map while paused, and fade payday floaters after a pause
- Payday floaters were stamped with performance.now() but aged with the map's
  animation clock, which stops while paused. After a pause they never faded:
  they sat off-screen and were drawn every frame, about a hundred more per
  payday on a big network, so long sessions got slower and slower. They are
  stamped with the animation clock now.
- While paused or with animations off, the map is only redrawn when the camera,
  the selection, hover or drag, the network or a new day changes it, plus once
  a second and while the land picture catches up after a zoom. A paused frame
  drops from ~4 ms to ~0.05 ms.
- After a day ends, the open panels update on the next frame, so one frame does
  not carry both the day's simulation and the panels. With a day on every frame
  they still follow, one frame behind.
2026-10-26 01:29:17 +01:00
Frederic Jung
9b1ed2f776 Show long NOC dashboard lists 100 rows at a time
The Connections tab drew every connection at once: 1,486 rows with their
buttons came to 32,000 elements, and laying them out again after every day
took about half a second while the dashboard was open (far longer on a phone).
The Connections and Customers lists now show 100 rows and a "+100 more"
button. Filters, sorting and totals still cover every row, and changing a
filter or the sort starts the list short again.
2026-10-26 00:42:37 +01:00
Frederic Jung
566dfcdbee Merge branch 'main' into faster-big-networks 2026-10-26 00:03:12 +01:00
Frederic Jung
a887b65a2f Make big networks fast: routing, panels and map drawing
A network with a hundred POPs and a thousand peering ports froze the game for
most of a second every day and after every click, because routing checked all
~1,800 exits for each of ~14,000 flows. Now:

- compute(): exits are asked once per network which networks they reach, each
  flow scans only those, and the first ECMP group is found without sorting. The
  graph runs on city indices with a typed-array Dijkstra (same heap moves, same
  ties), routers and per-link traffic are kept in typed arrays, the diverse-path
  check reuses one live-link graph, and R.ef is put together when a link is read.
  Results are bit-identical to before.
- Panels and the NOC dashboard are patched in place (morph) instead of being
  rebuilt, so the browser no longer restyles 1,500 rows every tick. Buttons whose
  action changed are swapped out, keeping #44's tap protection.
- The Networks tab works out each IX port's sessions once instead of once per
  network.
- draw() reuses screen-point buffers, a per-frame pair index and cached label
  widths, strokes the dotted fiber line on the path it already has, and uses
  native roundRect: about a third fewer canvas calls per frame, same output.
2026-10-26 00:03:05 +01:00
clayberF
eb7f4a8f8c Add Portuguese (Brazil) translation
Adds site/i18n/pt.js with all 2429 strings, registers Português in the
language list (picked automatically for pt-* browsers), caches it in the
service worker, and runs the full screen tour in Portuguese in the tests.
2026-10-25 19:58:05 -03:00
Frederic Jung
388b12d901
Gentler bends for links between nearby cities
The curve that dodges other cities wanted 24 map units of clearance and
picked the most distant of up to 3.8x curves when nothing cleared, so
short links in dense regions looped wide. Clearance now scales with link
length, offsets are capped at about a third of it, and a modest curve
wins over a giant one when nothing clears.
2026-10-25 21:56:21 +01:00
Frederic Jung
7e3ea0cefe
Router trade-ins, one swap a day, and speed-based requirements (#82)
Swaps and removals sell the old chassis for 30% (optics get 40%, #45),
and buttons show the net price. A POP accepts one model swap per game
day so a double click cannot chain two upgrades. Optic and wave
requirements name the port speed, since side-grades qualify too.
2026-10-25 21:49:51 +01:00
Frederic Jung
6c2d5da5b8
Add Munich with the Brezn-IX 2026-10-25 21:11:55 +01:00
Frederic Jung
8c44bb6459
Put Stuttgart and Frankfurt back in place, add Hamburg
Display nudges had pushed Stuttgart 30 units east and Frankfurt west of
Zurich. Small nudges now keep Frankfurt, Stuttgart and Zurich apart in
their real order. Hamburg gets the Moin-IX and the usual carriers.
2026-10-25 21:08:56 +01:00
Frederic Jung
c21a603765
Release 1.28.0 2026-10-25 20:51:16 +01:00
Frederic Jung
1418994233
Benelux: Brussels, Oostkamp and Bettembourg (#79)
Belgian red tape (POPs +30k, transit 1.5x), the Flanders duopoly
(eyeball growth at 35% unless an ad campaign runs), five networks reached
through their upstream Tier 1, the Clementine cable London-Oostkamp with
trawler cuts, and a wood-pellet cooling failure in Bettembourg.
2026-10-25 20:44:50 +01:00
Frederic Jung
05bb2b680a
NOC: incidents first, paid one-click fixes at the top (#63) 2026-10-25 20:34:00 +01:00
Frederic Jung
19e89456b2
Split embedded caches across both metro sites (#69)
Cache boxes get a site, default A (old saves too). New boxes balance
across the two buildings, a control moves boxes between them, a site
outage only takes out its own boxes, and dropping the second site moves
everything back to A.
2026-10-25 20:30:52 +01:00
Frederic Jung
daf922c5fe
Russian Goggle throttling shrinks demand instead of counting as unserved (#70)
The flow was carried in full and then halved on delivery, capping every
Russian city at about 93.5% served, under the 95% customers need. Halve
the Goggle share of demand at the source instead.
2026-10-25 20:27:15 +01:00
Frederic Jung
3a0de5d31a
Kansas City, Calgary, Vancouver and Ottawa, plus Tell Us and Bodgers (#76)
New cities with pun IXs and data centers; Ottawa has frequent power
cuts. Two Canadian eyeball networks, reachable over a PNI with the Tier 1
they buy transit from (new 'up' field), so Tier 1 players keep 100%
reach. Bell and the big carriers extend to the new cities. Cuts on
Canadian links can be beavers, with a badge.
2026-10-25 20:16:00 +01:00
Frederic Jung
1dbb0dea81
Show why Tier 1 is lost, and stop rounding reach up to 100% (#73)
Tier 1 needs reach above 99.9%, but the HUD rounded 99.5-99.9% to 100%,
and the reason only appeared once in a toast. Reach now shows one decimal
below 100%, t1Why names the unreachable networks, and the level card in
the Goals tab says why you are not Tier 1 while it lasts.
2026-10-25 20:07:37 +01:00
Frederic Jung
354100777e
Let new waves join any existing overland route (#77)
Same trench always joined the first link's trench and Diverse always dug
a new one, so a second route could never get a second wave. With two or
more routes the wave window lists each one plus a new diverse route;
joining keeps that route's price.
2026-10-25 20:03:44 +01:00