Commit graph

440 commits

Author SHA1 Message Date
Frederic Jung
9b7b1c150c
Series of Tubes 2.0.0: one game, four doors 2026-10-29 07:57:21 +01:00
Frederic Jung
efb14680cc
Merge save slots: one network per window, consistent saves 2026-10-29 07:57:00 +01:00
Frederic Jung
5dc7bebfb6
Merge gameplay rules: the rulebook skill, its test, and homegrown eyeballs in every country 2026-10-29 07:50:07 +01:00
Frederic Jung
d2f6ac1d5b
Merge review fixes: DDoS (#153 fixes kept, multi-ingress model dropped), locked rules 2026-10-29 07:49:00 +01:00
Frederic Jung
9fe5f124c6
Merge speed round 2: honest transit bills, faster loading 2026-10-29 07:40:40 +01:00
Frederic Jung
08e88d53a8
Save slots: reuse the parsed index between autosaves 2026-10-29 07:40:14 +01:00
Frederic Jung
5f412f72d8
Merge v2 into v2-saves 2026-10-29 07:32:19 +01:00
Frederic Jung
c5142046ed
CHANGELOG: China licence lead time, locked rules and attacker names in saves 2026-10-29 07:17:15 +01:00
Frederic Jung
31e44440e8
Flood Season escalates again, and empty POPs no longer hold floods for free
Every flood was 700G or more from day 1, so the scenario no longer built up. Sizes
are 1.36's again (a third terabit monsters, the rest ordinary floods sized to the
city), growing by the year as #153 had it. Floods go for POPs that serve someone,
and a city with nobody to serve only holds a flood its tools soak up. Seeded runs
over a year: no defence or one 1T center cannot win; one 1T center with full
Flowspec and clean pipe wins around day 100 (main needed two centers, day 164).
2026-10-29 07:17:08 +01:00
Frederic Jung
5f09111a95
Merge v2 into v2-gamerules 2026-10-29 07:15:56 +01:00
Frederic Jung
06da3f7456
Gameplay rules skill, pointer in CLAUDE.md, CHANGELOG for homegrown eyeballs 2026-10-29 07:15:32 +01:00
Frederic Jung
2b8b641216
Tests for the gameplay rules: world, networks, modes, content, fun and fairness, with documented exceptions; drop exchange ports in cities without an exchange 2026-10-29 07:13:56 +01:00
Frederic Jung
7e068fde98
Island eyeballs also buy straight from a Tier 1, like every island network 2026-10-29 07:08:51 +01:00
Frederic Jung
94488bf8f7
Save slots: CHANGELOG and architecture notes 2026-10-29 07:05:48 +01:00
Frederic Jung
871b340910
Homegrown eyeballs: 63 real consumer networks so every country has two of its own, translated 2026-10-29 07:05:32 +01:00
Frederic Jung
df8edddfe6
CHANGELOG: faster loading of big networks 2026-10-29 07:05:31 +01:00
Frederic Jung
732c329844
Requirements: build the possible-diversity map on city indices
The first diversityPossible() call after a save loads (migrate() checks every
customer's requirements) built a graph of every buildable link between all
~28k city pairs, scanning all 475 cable segments for each pair, with string ids
and objects for each of ~19k links: about 0.8 s on a fast machine, ~0.9 s of a
throttled phone's boot. Now the cables come from a table per pair and the graph
holds city indices and one number per risk (each land trench and own cable on
its own; every segment of a cable, or a fabric, sharing one). The answers match
disjointRoutes() over the old link list for all 14,042 sampled pairs, won or not
and with scenario bans.
2026-10-29 07:05:23 +01:00
Frederic Jung
cd46128c09
Save slots: tests for migration, two windows, take-over, stale writes, delete, import/export, puzzles 2026-10-29 07:05:11 +01:00
Frederic Jung
4bb5e07c28
The China licence follows quick lead times: about 5 days instead of 45
Change Freeze and Sandbox deliver everything in a tenth of the time, but the licence
still took 45 days and the button said so. It now waits leadDays(45), and the button
shows that number.
2026-10-29 07:04:45 +01:00
Frederic Jung
1692217549
Flood Season attacker names come only from the game's own list
An imported save could put raw HTML in an attack's attacker name, which reached the
end-of-flood toast unescaped. sanitize() keeps only names from the list, and the
toast escapes the name and city anyway.
2026-10-29 07:03:39 +01:00
Frederic Jung
13376ceb97
Merge the weekly puzzle generator into v2 2026-10-29 07:01:34 +01:00
Frederic Jung
537ec4efd0
Saves get the rules of their mode, whatever their rules say
sanitize() trusted any preset and override in a save, so an edited or imported save
could run a Normal game on puzzle rules (no clock, ever), On-call with infinite money
and open gates, sandbox powers without the sandbox tag, or a scenario off On-call.
Rules now follow the mode: scenarios and the weekly are On-call, a sandbox keeps only
its chaos, a Normal game one of the three Normal presets unchanged.
2026-10-29 07:01:18 +01:00
Frederic Jung
5c2b3a4758
Map: a link's curve only measures the cities that could be in its way
bezGeom() measured every city against every candidate curve, for every link the
first time the map drew it. A curve stays inside the box of its end and control
points, so a city further than the clearance it needs outside that box always
measures as clear; leaving it out gives the same curve. About 4x faster, and
the curves on the big fixture are byte-identical.
2026-10-29 07:01:01 +01:00
Frederic Jung
adc312f27b
Map: test land polygons against their bounding box first
The sea waves, hills and the far view's islet list test points against every
coastline polygon while the page loads: about 0.8 s of a throttled phone's load.
A point outside a ring's box is outside the ring, so nearly every test stops
there. Waves, hills and the far view's islands come out byte-identical.
2026-10-29 07:00:53 +01:00
Frederic Jung
8d72259500
Weekly puzzle generator: v2 counts a whole cable as one failure, so require it instead of patching it in 2026-10-29 07:00:34 +01:00
Frederic Jung
b9b55f1deb
Networks name their home consumer markets (cc): eyeball networks and the Tier 2 incumbents that sell to homes 2026-10-29 06:58:34 +01:00
Frederic Jung
2223a4b044
Merge review fixes: standing orders 2026-10-29 06:58:33 +01:00
Frederic Jung
023114103d
Weekly puzzle tests: look at the last three weeks only, so they stay fast as weeks pile up 2026-10-28 20:54:34 +01:00
Frederic Jung
d56039695c
Attacks arrive as on 1.36 again: drop the distributed multi-ingress flood model
Frederic's call for 2.0: keep #153's fixes, NOC breakdown, new vectors, gaming risk
and overlapping attacks, but not the per-port model. It split every flood over each
ingress port with traffic (over a thousand on a big network), stored them all in the
save, routed one pinned flow per port, and with it came the build-order and
victim-scoring bugs found in review.

Each attack is again one entry port at the victim (a.entry): upstream clean-pipe,
Flowspec on the victim's router, IX blackholing, a sacrificial PNI and RouteScript
filter it in that order (ddosMitigation), then scrubbing; what leaks is junk at the
victim spread like its traffic, exactly as on main. Saves from 2.0 builds with
a.entries load: sanitize drops the shares and a 'distributed' entry becomes 'edge'.
Removed: R.ingressPorts, ddosEntries/ddosFold/ddosSlices/ddosCities/ddosHasIx, pinned
flows (and the pinned-rank handling in routing and its reference), the mixed-TCAM
line and the 'across N ports' message, and their tests; the scrubbing source-city
test now uses two victims sharing one center. CHANGELOG #153 bullets describe what
ships and credit #153.
2026-10-28 20:53:58 +01:00
Frederic Jung
2011311084
Weekly puzzle 2026-W45 at the merged prices; determinism test compares two fresh runs 2026-10-28 20:52:59 +01:00
Frederic Jung
da8150b7c4
Save slots: several networks per browser, one per window, with a cross-window guard 2026-10-28 20:52:47 +01:00
Frederic Jung
faac3427f3
Merge v2 into v2-weekly 2026-10-28 20:52:08 +01:00
Frederic Jung
587d50decf
Weekly puzzle: tests, CHANGELOG, architecture and deploy notes 2026-10-28 20:50:17 +01:00
Frederic Jung
2ac9143db9
Weekly puzzle workflow: Sunday 03:37 UTC, commit the data to main, redeploy the live release with it through release.yml; releases ship every weekly from main 2026-10-28 20:44:28 +01:00
Frederic Jung
372893ec75
Weekly puzzle generator: themed, solver-budgeted, verified by the game's own stars; first three weeks 2026-10-28 20:42:51 +01:00
Frederic Jung
34b72f6d44
Weekly puzzle: Sunday 06:00 Berlin weeks, published puzzle fetched when Puzzles opens, seeded fallback, countdown and door badge 2026-10-28 20:42:37 +01:00
Frederic Jung
94b27eadf3
Billing: a recompute after the day tick no longer counts today's 95th-percentile sample twice
dayTick() routes the day, then appends today's transit use to t.hist. Every
compute() after that (any click, the intern, the sales trial) took the last 29
entries of t.hist, which now end on today, and added today's use again: today
counted twice and the 30th day back dropped out. So compute() gave a different
transit bill the second time after each day. p95() now leaves today's sample out
once S.hist says the day has been recorded.

This was the only part of compute() that was not a pure function of S. The rest
of the drift round 1 saw (R right after dayTick vs. a fresh compute) is dayTick
itself changing S after its compute (customers churning, events ending), which
is intended: the next day routes the new state. Scenic circuits' hysteresis is
documented, with a test that two calls converge.
2026-10-28 20:42:08 +01:00
Frederic Jung
ec1cf7d3b5
CHANGELOG: standing orders as they ship (sales and repair orders credit #185, PNI batches in the Ops sheet, weekly report) 2026-10-28 20:40:25 +01:00
Frederic Jung
9a0fb48aa3
Standing orders: the hiring pitch promises the weekly shift report 2026-10-28 20:40:14 +01:00
Frederic Jung
94e71beb16
Standing orders: the Ops sheet opens with the intern's mood and a weekly shift report 2026-10-28 20:39:33 +01:00
Frederic Jung
0788b98729
Standing orders: the intern's NOC notice is one shift report a week; the daily lines stay in the Ops sheet 2026-10-28 20:38:27 +01:00
Frederic Jung
e56659f949
Standing orders: caches get a running-cost budget and respect the cash floor; budgets and the shift log show monthly costs 2026-10-28 20:28:50 +01:00
Frederic Jung
b485b54d20
Merge review fixes: puzzles 2026-10-28 20:25:02 +01:00
Frederic Jung
b5cba3e591
BGP at 3 a.m. brings twice On-call's DDoS, as it says, not twenty times
Spicy chaos moved attacks onto the gamers' daily schedule without scaling it, so the
preset had about 20x the attacks of On-call. Without gaming customers, attacks stay
on the failure schedule (which spicy already runs 1.8x as often, with a slightly
heavier DDoS weight to make it 2x); gaming customers still bring their busier one.
2026-10-28 20:23:44 +01:00
Frederic Jung
ef700a3480
Standing orders: one failing order is paused instead of breaking the day; the LAG slip follows the transit order's switches 2026-10-28 20:22:09 +01:00
Frederic Jung
f13b0d40af
Merge review fixes: Tier 1 cone, badges, merged-PR polish 2026-10-28 20:21:11 +01:00
Frederic Jung
23634241c0
Standing orders: per-POP exceptions are dropped with their POP 2026-10-28 20:19:48 +01:00
Frederic Jung
e80fd0e453
Spicy chaos stretches exactly what an incident holds down
stretchInc() stretched anything ending on the same day: always the primary attack
(even when the incident was about another one, never the overlapping ones) and any
unrelated outage that happened to end then. It now finds the attack by i.atk and
everything else by the incident's ref, as clearInc() does, and saves allow the
longest stretched attack (11 days).
2026-10-28 20:19:41 +01:00
Frederic Jung
4c0d535369
Keep the cone carrier lookup out of compute() 2026-10-28 20:18:06 +01:00
Frederic Jung
e7554f66ea
Standing orders: no recompute on a shift that changed nothing in the network 2026-10-28 20:17:59 +01:00