Commit graph

67 commits

Author SHA1 Message Date
Frederic Jung
c64b139a86
Fewer merge conflicts: actions by area, one city per line, sorted dictionaries
- ACT is split by area into game/90-actions/*.js (const ACT in the first file,
  Object.assign in the rest)
- CITY_LL, CITY_NUDGE and LANDS_LL have one entry per line; the id-keyed ones
  are sorted
- site/i18n/*.js are sorted, one entry per line; i18n-check enforces it and
  --fix (npm run i18n:fix) restores it; scripts/i18n-add.js adds, removes
  and renames entries in place
- scripts/legacy/port-branch.js moves a branch's site/index.html edits into
  src/ during a merge with main
- perf workflow and PR template build the base page with scripts/lib/page.js
2026-10-27 10:10:16 +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
295e68cc46
Australia, supply chain, sold-out waves and quicker PNIs (1.33.0) 2026-10-27 09:39:49 +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
813e8d95e3
Merge pull request #142 from LookedPath:fix/subsea-upgrade-scheduling 2026-10-27 07:19:21 +00:00
Frederic Jung
6137034d2b
Atlantic islands, peering inbox, slow PNIs, backhaul latency and more (1.32.0) 2026-10-27 06:29:35 +01:00
LookedPath
2a83892de8 Fix subsea upgrade scheduling and add one-click construction rush 2026-10-26 22:47:13 +00: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
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
LookedPath
8ac420c4c8 Route new subsea cables around coastlines 2026-10-26 19:33:08 +00:00
Frederic Jung
729d4d303d
French, subsea cable designs, Road to Tier 1 and more (1.31.0) 2026-10-26 17:59:37 +01: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
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
f1322f2cd2
Africa, Brazil, Portuguese and a faster game on big networks (1.29.0) 2026-10-26 08:49:19 +01:00
LookedPath
ffb8c50895 Add routing reference regression and exported-save benchmark 2026-10-26 06:11:12 +00: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
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
Frederic Jung
c21a603765
Release 1.28.0 2026-10-25 20:51:16 +01:00
Frederic Jung
d4034bca06
Release 1.27.0 2026-10-25 19:10:32 +01:00
Frederic Jung
cfb5fb5f8e
Draw subsea cables when zoomed in (#49), release 1.26.1
The world layer only includes cables below zoom 1.7, but drawCables
skipped its own lines whenever any cached layer existed, so zoomed in
nobody drew them. The layer now records whether it holds the cables.
2026-10-25 17:34:48 +01:00
Frederic Jung
c181065d9f
Release 1.26.0 2026-10-25 17:23:53 +01:00
Frederic Jung
055a975851
Customer levels 5 to 13
Levels now run to 13, driven by a requirements table (peak, POPs,
continents). Each unlocks something: seven router models up to 3.2T with
3.2T ports and 12.8T waves, C+L line systems, 3.2T transponders, eight
pairs per land trench, a 102.4T fabric, 100T scrubbing, six customer
types, and free PNIs from paid-peering networks. Four traffic eras raise
the eyeball ceiling so the higher levels are reachable on a 47 Tbps map.

Default router upgrades follow the badge-less main line per class; port
and wave tiers past 1.6T/6.4T only show once unlocked. Old saves keep
their level; land trenches clamp to four pairs below level 12.
2026-10-25 16:40:17 +01:00
Frederic Jung
6b0f3d6eeb
Release 1.25.2 2026-10-25 15:25:28 +01:00
Frederic Jung
07d12b931d
Release 1.25.1 2026-10-25 14:48:49 +01:00
Frederic Jung
bfe12cca7d
Release 1.25.0 2026-10-25 14:35:35 +01:00
Frederic Jung
7be8b19832
Release 1.24.0 2026-10-25 14:32:01 +01:00
Frederic Jung
b53d7613cf
Release 1.23.0 2026-10-25 14:08:55 +01:00
Frederic Jung
6a8df55dd9
Release 1.22.0 2026-10-25 12:34:28 +01:00
Frederic Jung
9d53436cb7
Release 1.21.0 2026-10-25 12:03:58 +01:00
Frederic Jung
f2379bf72c
Settings screen, pause on furious customers, customer happiness overview (1.20.0)
Fixes #13, fixes #14, fixes #15
2026-10-25 10:29:49 +01:00
Frederic Jung
dfa28506a7
Release 1.19.0 2026-10-25 10:10:09 +01:00
Frederic Jung
11118ed5e1
Keep the iPhone home-screen height fix applied, add a viewport readout (1.18.4) 2026-10-25 09:00:11 +01:00
Frederic Jung
a46c9f9694
Fill the screen as an iPhone home-screen app (1.18.3) 2026-10-25 08:47:50 +01:00
Frederic Jung
6b5fe3f14c
Add a petabit-per-second badge (1.18.2)
A new legendary badge for serving 1 Pbps — a thousand terabits — the tier
above Hundred Terabits. Italian and a test included.
2026-10-25 07:36:49 +00:00
Frederic Jung
c445fbd0ba
Add a DDoS-defence goal and badges (1.18.1)
A goal to build your first scrubbing center, and badges for weathering an
attack, holding a multi-terabit flood, running a clean-pipe or a sacrificial
PNI, blackholing your own city, and landing a HackBack that works. New stats
track the hold/monster/hack-win counts; Italian and a test included.
2026-10-25 07:33:49 +00:00
Frederic Jung
a2ab478386
Scrubbing tiers, clean-pipe, sacrificial PNI, IX blackhole, SLA (1.18.0)
Rounds out the DDoS toolbox. Scrubbing centers come in 100G/1T/10T tiers and
clean only up to their capacity; always-on or cheaper on-demand (which lags a
couple of days). A transit clean-pipe add-on scrubs a flood upstream before it
reaches you. A Chinese PNI can be marked sacrificial: a flood over it dies on
the small port instead of the core, at the cost of half its legit capacity. A
new IX-blackhole mitigation drops about half the junk while keeping the victim
up. Selling DDoS protection now carries an SLA penalty when a protected
customer still goes down. Italian and tests included.
2026-10-25 07:03:03 +00:00
Frederic Jung
5036f1a5a8
Tie Flowspec filtering to the router's TCAM (1.17.1)
Flowspec was a flat network-wide licence. In reality the drop rules live in
hardware TCAM, and the budget differs by platform, so flowspec is now a
router-model capability: none on the used Rusty, a little on merchant-silicon
and whitebox models, full on the big chassis. The flood is filtered only where
the attacked POP's router can do it, and a bigger TCAM knocks it down further.
The licence is gone; the NOC shows how many POPs are capable and the attack
panel names the chassis doing the filtering.
2026-10-25 06:39:36 +00:00
Frederic Jung
c3b99df788
Shape DDoS attacks and add a mitigation toolbox (1.17.0)
DDoS was one flat random event. Now each attack has a vector (DNS, NTP,
CLDAP, SYN, HTTP), a size from a few Gbps to a multi-terabit monster, a
target POP, a duration and an entry point among that city's uplinks.

The NOC grows a live attack panel and a toolbox: RTBH (free, instant, but
the victim goes dark too), a one-time Flowspec licence that drops known UDP
floods at the edge but cannot touch an HTTP flood, the existing scrubbing
center, and HackBack 3000, which sometimes ends the attack and often
flattens an innocent for a fine. New Vigilante and Collateral Damage badges,
Italian translations, and tests for the attack, each tool and old saves.
2026-10-25 06:18:51 +00:00
Frederic Jung
443202876a
Add MIT license, contributing guide, CLAUDE.md, architecture notes and repo skills 2026-10-25 07:07:00 +01:00
Frederic Jung
06576357c9
Add customers that connect over interconnection fabrics (1.16.0)
Fabric customers buy transit, or a circuit to one of your POPs, over
Megapork, PocketFabric or Consolation Connect. They come in through your
NNI port in their city and count against its capacity.
2026-10-25 06:29:33 +01:00
Frederic Jung
1d6ec48bf3
Zoom levels of detail, grouped parallel waves, POP decommissioning (1.15.0)
Zoomed out, cities become dots and POPs small router pills with thinner
links and fewer labels. Up close a POP shows the router instead of the
skyline, with a router B for a second site. Parallel waves on one cable
draw as one line with a combined label. POPs can be decommissioned one at
a time or in bulk, with early-termination penalties for affected
customers. Dark fiber panels can add parallel links. NLNOG Day joins the
conferences.

Closes #37
Closes #19
Closes #32
2026-10-25 06:22:20 +01:00
Frederic Jung
7e20a1a2f0
Add Manchester, Edinburgh, Bude and Stavanger with North Sea cables (1.14.0)
New UK and Norway POPs with local eyeball networks, and nine cables:
NO-UK-Way, Celtic Norsemen, Havhingsten Hoofbeat, Shefa Sheep Line,
Oil Rig Wi-Fi, Pas de Câble, Apollo 13, Yellow Brick Road and
Glo-in-the-Dark.
2026-10-24 23:19:46 +02:00
Frederic Jung
8260ce4dde
Keep the update notice small on phones (1.13.2)
The phone layout moved the notice to the bottom but kept its top offset,
so it stretched over the whole screen.
2026-10-24 23:10:20 +02:00
Frederic Jung
e34a389d6d
Release 1.13.1 2026-10-24 23:02:58 +02:00
Frederic Jung
c129883642
Release 1.13.0 2026-10-24 22:56:42 +02:00
Frederic Jung
cc28dfeb74
Add Korea's sender-pays market, Sparkly Seabone as a Tier 1, and release 1.12.0
Seoul transit costs four times the usual price and the three Korean
incumbents only peer over paid PNIs billed per gigabit sent. Glitch can
leave Korea and Faceplant can reroute it via Hong Kong. Adds the Gangnam
Style Peering scenario and the Sender Pays badge.

Sparkly Seabone becomes a Tier 1 across the Mediterranean, Europe and the
Americas; older saves keep the five Tier 1s they were playing for.

A wave supplier's optical control plane can melt down and take every
leased wave in a region dark at once.

Closes #23
2026-10-24 22:39:36 +02:00
Danilo Carbonaro
04eb32e0a5 Add Italian translation and a language switch
English stays the source text and the default. Player-facing strings go
through tr()/trn(), which look the English up in a per-language dictionary
(site/i18n/<lang>.js) and fall back to it unchanged. The dictionary is only
loaded when the game runs in that language. The language follows the
browser on the first visit and can be switched under Settings or on the
title screen; the choice is remembered.

- site/i18n/it.js: complete Italian translation (~1900 entries)
- scripts/i18n-check.js / npm run i18n:check: lists missing or stale entries
  and translations that drop a {placeholder} or HTML tag
- tests/i18n.test.js: language selection, fallback, dictionary integrity,
  and a tour of every screen, failure and event in English and Italian
2026-10-24 21:52:27 +02:00
Frederic Jung
37a83c2b3f
Release 1.11.0 2026-10-24 21:51:33 +02:00
Frederic Jung
8fd79ef122
Release 1.10.0 2026-10-24 06:47:10 +02:00