Commit graph

608 commits

Author SHA1 Message Date
Frederic Jung
87fac683f0
Language is a dropdown on the title screen and in Settings 2026-10-28 08:18:56 +01:00
Frederic Jung
3b8bd4e534
New networks start at half speed (#186) 2026-10-28 07:53:36 +01:00
Frederic Jung
b4f8d9c7f5 Put a link on standby; the routing metric stays per city pair (#122)
A backup-only link next to a normal one still carried traffic, because
parallel links merge into one edge. The metric stays on the city pair
(S.pairMet), and any link can go on standby: it adds capacity that
fills only after the active links, so it idles as a backup, takes the
overflow when they are full and carries the traffic when they are down.
Build order no longer matters, and adding a link never idles the
others. Old saves keep each pair's lowest metric with every link
active, which is how they routed before. The panel says what a standby
link is doing, the redundancy list tags it, the map draws it dashed
while idle, and traceroute shows the active link.
2026-10-28 07:11:47 +01:00
Frederic Jung
da69c5d843
Subsea cables stay at sea, bug and idea links (1.35.1) 2026-10-28 06:30:42 +01:00
Frederic Jung
29ad74743c
Subsea cables stay at sea: fix the date-line wrap and routes across land (#183)
Eight Pacific pairs added in 1.35.0 had waypoints that jumped from +180 to
-180 longitude, so the renderer drew them across the whole map. Waypoint
longitudes are now continuous, as the hand-drawn routes always were.

A scan of all 475 cable pairs found 147 that cut across land with sea on both
sides (the Horn of Africa, Arabia, India, Brazil, Newfoundland, ...). Those
now follow the game's own sea router, simplified only as far as the line
stays off land; inland endpoints route between the coastal ends and keep
their overland leg. 27 more pairs into inland cities now come ashore at the
nearest coast. Hibernia Express is traced by hand south of Ireland to Brean
so it stays the straightest Atlantic crossing. Left alone on purpose: the
Suez Canal and Dardanelles crossings, Quintillion's overland Alaska leg and
Celtix's Welsh landing.

Tests: no pair jumps the seam and none crosses more than 160 km of land
mid-route. EIG is now 8,613 km, so overland is 9.97x subsea instead of
10x+; Lisbon-Lagos fits 1.6T directly at 5,914 km.

Thanks to mindolo for the report and the analysis in #183.
2026-10-28 06:17:39 +01:00
Frederic Jung
daa1ad0b05
Bugs and ideas go to GitHub: a card in the menu and How to play; Signal is for chatting 2026-10-28 06:00:55 +01:00
logfro
dd82737af8 Show auto-accept countdowns only for ready offers
Hide the countdown when an offer has unmet requirements, missing locations,
expired terms or insufficient service capacity. Keep manual acceptance
available with its existing behavior.

Share capacity previews across the Deals, city and fiber views, reuse them
between automatic checks, and invalidate them after actions or incidents.
Check changing requirements immediately and always perform a fresh full
validation before automatically signing a contract.

Add regression tests for blocked offers, requirements becoming fulfilled
or unfulfilled, capacity changes and preview reuse. All 17 automation tests
pass; the full independent branch passes 314 of 315 tests, with only the
pre-existing locale-dependent subsea formatting failure remaining.
2026-10-28 02:55:12 +01:00
logfro
abe92fe3b1 Add real-time sales automation and automatic paid repairs
Add independent toggles for auto-accept in Deals and auto-pay repairs in
NOC. Save both settings and default them off for older or malformed saves.

Check sales every five wall-clock seconds regardless of game speed, and
show a small countdown on Accept buttons in Deals, city offers and fiber
broker offers. Only sign when all requirements, locations, equipment and
service capacity are ready. Trial the added demand before accepting it,
protect healthy existing customers and account for booked future events.

Use the existing paid repair action for affordable active incidents,
including slow router reboots. Skip expired incidents, removed equipment,
DDoS attacks and repairs that were already rushed. Pause both automations
with the game, hidden pages and open dialogs.

Translate the controls into all five supported languages and cover timing,
countdowns, capacity, budgets, repair payments, persistence, mobile controls
and trial rollback with deterministic tests. Chromium checks verify about
five real seconds at both 0.5x and 8x game speed and exercise the supplied
large save without changing the save file.
2026-10-28 02:19:47 +01:00
logfro
4932b3f93a Add bulk PNI ordering across networks and POPs
Add two actions to the NOC Traffic tab:
- Order PNIs with one network at every shared POP.
- Order PNIs with all eligible networks at every shared POP, including
  long-tail peers.

Both actions offer a selectable port size and preview new connections,
upgrades, total setup costs, additional monthly charges and blocked sites.
Upgrade smaller PNIs while preserving larger connections, pending orders
and existing LAG members. Reserve router capacity across the batch and
account for pending speed and LAG augments to avoid overbooking ports.

Require the full setup budget before placing any orders. Reuse normal
peering policies, minimum port sizes and provisioning delays, then
recompute and save once for the entire batch. Keep large global previews
compact with collapsible network and blocked-connection lists.

Translate the new UI into all five supported languages and add tests for
single-network and global ordering, capacity, budgets, repeated clicks,
save migration, and mobile keyboard interaction.

Validation:
- Build and translation checks pass.
- 308 of 309 tests pass. The existing subsea reach test also fails on
  origin/main because the Windows locale uses a dot as the thousands
  separator where the assertion expects a comma.
- Chromium desktop and phone checks pass with the supplied save.
- Big-network benchmark against origin/main: dashboard tabs take
  16.8 -> 17.6 ms on desktop and 77.1 -> 80.7 ms on a simulated phone
  (median of 15 runs). Routing results are identical, with no slowdowns
  beyond the benchmark's noise threshold.
2026-10-28 01:44:17 +01:00
Frederic Jung
ad94833ad1
Caribbean, Arctic, Indian Ocean, more cables and networks, Spanish, capacity conferences (1.35.0) 2026-10-27 22:39:28 +01:00
Frederic Jung
9df1835f70
More real cables: North Sea, Baltic, Tampnet, Indian Ocean and Asia-Pacific
North Sea and Baltic: Kristiansand, Esbjerg and Riga as new landings.
Havfrue's Danish and Norwegian landings, HAVSIL, Skagenfiber, Norfest and
NorSea Com (Tampnet, past the Draupner and Ekofisk platforms to
Lowestoft), CeltixConnect-2 and North Sea Connect, C-Lion1's real
Rostock landing, GlobalConnect's Digital E4, Eastern Light, the Elisa
cables, Latvia-Sweden and BCS. Baltic cables carry an anchor flag that
makes them cut more often (it used to be a list of two ids).

Indian Ocean and Asia-Pacific: Muscat, Malé and Fukuoka as new landings.
SJC2, ADC, ASE, APCN-2, EAC-C2C, FLAG and its North Asia loop, SEA-ME-WE 5,
Unity, TGN-IA, TPE, Hong Kong-Guam, MIST, IAX, TIC, TW1, MCT and KJCN as
puns; the missing real landings on SEA-ME-WE 4 and 6, AAE-1, PEACE, APG,
SJC, PLCN, NCP, FASTER, JUPITER, Indigo, Bifrost, 2Africa Pearls and the
Oman Australia cable. Existing pairs are untouched so saved links keep
their cable. Routes come from the game's own sea router.

Tests that relied on Colombo having one cable and Oslo having none now use
St Helena and Zurich.
2026-10-27 22:29:32 +01:00
Frederic Jung
5538e5109b
Merge fix/176-gzip: compress huge saves with the browser's gzip (#176) 2026-10-27 21:47:46 +01:00
Frederic Jung
146fae0faf
Compress huge saves with the browser's gzip (#176) 2026-10-27 21:34:35 +01:00
Frederic Jung
75f343f019
Caribbean, Indian Ocean, Pitcairn, Alaska and Russia's Far East; more US and Australian eyeballs (#125, #152, #124, #145, #155, #154)
Caribbean: San Juan, Santo Domingo, Kingston, Havana, Nassau, Port of Spain,
Bridgetown, Fort-de-France and Willemstad on their own islands, with
ARCOS, Americas-II, ECFS, Southern Caribbean Fiber, ALBA-1, CFX-1,
Fibralink, BICS, AMX-1 and EC Link as puns. Exchanges only where one runs
(PR-IX, JIXP, TTIX, AMS-IX Caribbean).

Indian Ocean: Réunion (REUNIX as Rougail SAUCIX), Mauritius, Madagascar
and the Seychelles on SAFE, LION, METISS, EASSy, SEAS and PEACE.

Pitcairn: no cable and no provider; cables may land there and the UK pays
a monthly grant while the islanders are served.

Alaska, Prince Rupert and Russia's Arctic and Pacific: towns with no road
in are their own landmass. Real cables only (Quintillion, AU, AKORN,
AU-Aleutians, Topaz, Connected Coast, Sakhalin-Kamchatka-Magadan,
Petropavlovsk-Anadyr, RJCN, HSCS). Polar Express never got past Amderma,
so its towns have a beach for your own cable instead.

Eyeballs: AT&Tease (a Tier 1 for new games only, t1v 3), Tee-Hee Mobile,
Coax, Pessimum, Final Frontear, GFibber, Sonic Boomer; Neptoon, Lawn-tel,
Pent-Up Net, Dive-Bomb Magpie, Internope; Musklink in the US. Coax merges
into Spectre-um on day 365, Final Frontear into Very-Zone on day 730.
Coastlines refined from Natural Earth around the new places.
2026-10-27 21:34:09 +01:00
LookedPath
66ae4be72d Add editable optic counts to fiber link panels 2026-10-27 20:30:20 +00:00
Frederic Jung
8c3ac4e9df
Merge fix/176-save-size: warn when saving fails, smaller saves (#176) 2026-10-27 21:19:18 +01:00
Frederic Jung
9853ebe4fc
CHANGELOG: smaller saves are not faster to write 2026-10-27 21:13:57 +01:00
Frederic Jung
d36426a8ae
Smaller saves: leave customer defaults out and rebuild them on load (#176) 2026-10-27 21:13:25 +01:00
Frederic Jung
cbe11339a7
Tell the player when the game cannot save (#176) 2026-10-27 21:11:17 +01:00
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
Frederic Jung
5b5e011f69
README: drop the Translations section 2026-10-27 18:27:29 +01:00
Frederic Jung
c557bb554b
README: drop the file tree 2026-10-27 18:26:56 +01:00
Frederic Jung
a93f54cb8a
README: add star history, drop Releasing, Hosting setup and Analytics; Signal is for chat, issues for anything meaningful 2026-10-27 18:26:07 +01:00
Frederic Jung
20bc35123b
CONTRIBUTING: the PR limit is enforced by GitHub, drafts count 2026-10-27 18:17:57 +01:00
Frederic Jung
7eff0ba307
CONTRIBUTING: only issues labelled implement, at most 4 open PRs, no AI agents 2026-10-27 18:14:12 +01:00
JMF-Alex
288c78e9a0 feat: Spanish translation 2026-10-27 16:31:58 +01:00
Frederic Jung
e7ae3b18bf Merge origin/main into codex/ddos-scaling-and-mitigation 2026-10-27 13:21:51 +00: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
Filip Hruska
330dbd5935 Merge latest main into codex/ddos-scaling-and-mitigation 2026-10-27 13:01:22 +00:00
Filip Hruska
925e7c1798 rewrite changelog 2026-10-27 13:01:14 +00:00
Filip Hruska
744b769000 Rework DDoS generation, mitigation accounting and NOC reporting
Scale normal attacks with network demand, level and gaming exposure, with
randomized sizes, durations, overlapping attacks and distributed ingress.
Set average sizes to three times the non-gaming baseline at one gaming
customer and eight times at fifty. Keep Flood Season escalating after its
challenge ends.

Add gaming-specific vectors, Memcached amplification and ACK floods.
Account for upstream scrubbing, Flowspec and shared scrubbing capacity in
sequence. Show precise mitigation totals and one destination-based
scrubbing detour in existing live attack cards.

Keep each source-to-scrubbing route distinct in link traffic breakdowns,
including the source label, Open button and map highlight.

Include deterministic tests, old-save migration and translations.
2026-10-27 13:00:57 +00: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
97b195dd91
Smaller translation downloads (1.34.1) 2026-10-27 12:11:13 +01:00
Frederic Jung
5158491b79
Add a Code of Conduct: welcoming, no harassment, be excellent to each other
Covers GitHub, the Signal group and anywhere the project is represented.
Reports go to Frederic privately on Signal. Linked from the README and
CONTRIBUTING.
2026-10-27 11:51:54 +01:00
Frederic Jung
81f0915a7e
Changelog: smaller translation downloads 2026-10-27 11:30:40 +01:00
Frederic Jung
a4f89491e6
Docs: the single-file page and English keys lasted until 1.34 2026-10-27 11:28:17 +01:00
Frederic Jung
f454c71fda
Merge remote-tracking branch 'origin/main' into refactor/split-page 2026-10-27 11:27:15 +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