No description
Find a file
2026-10-27 12:11:13 +01:00
.claude/skills Ship short ids instead of labels; checker, tests and docs for labels 2026-10-27 11:27:11 +01:00
.github Fewer merge conflicts: actions by area, one city per line, sorted dictionaries 2026-10-27 10:10:16 +01:00
docs Docs: the single-file page and English keys lasted until 1.34 2026-10-27 11:28:17 +01:00
scripts Docs: the single-file page and English keys lasted until 1.34 2026-10-27 11:28:17 +01:00
site Translations keyed by labels instead of English text 2026-10-27 11:05:09 +01:00
src Docs: the single-file page and English keys lasted until 1.34 2026-10-27 11:28:17 +01:00
tests Ship short ids instead of labels; checker, tests and docs for labels 2026-10-27 11:27:11 +01:00
.gitattributes Docs and guard rails: GitHub Pages only, where code goes, updated skills 2026-10-27 10:15:12 +01:00
.gitignore Series of Tubes 1.0.0 2026-10-23 09:01:39 +02:00
CHANGELOG.md Smaller translation downloads (1.34.1) 2026-10-27 12:11:13 +01:00
CLAUDE.md Ship short ids instead of labels; checker, tests and docs for labels 2026-10-27 11:27:11 +01:00
CODE_OF_CONDUCT.md Add a Code of Conduct: welcoming, no harassment, be excellent to each other 2026-10-27 11:51:54 +01:00
CONTRIBUTING.md Add a Code of Conduct: welcoming, no harassment, be excellent to each other 2026-10-27 11:51:54 +01:00
LICENSE Add MIT license, contributing guide, CLAUDE.md, architecture notes and repo skills 2026-10-25 07:07:00 +01:00
package-lock.json Smaller translation downloads (1.34.1) 2026-10-27 12:11:13 +01:00
package.json Smaller translation downloads (1.34.1) 2026-10-27 12:11:13 +01:00
README.md Add a Code of Conduct: welcoming, no harassment, be excellent to each other 2026-10-27 11:51:54 +01:00

Series of Tubes

Build the internet, one tube at a time. A free cartoon browser game about how the internet really works. Play it at seriesoftub.es.

Series of Tubes

You start with one router in one city and grow into a transit-free Tier 1:

  • Customers: home broadband ("eyeballs"), enterprises, hosting, L2VPNs, DDoS protection, high-frequency traders with latency budgets, AI GPU data centers and hyperscaler DCI deals. Some come with very specific requirements.
  • Interconnection: IP transit billed on the 95th percentile, internet exchanges with route servers, open/selective/restrictive/paid peering, PNIs, embedded CDN caches, and NNI fabrics for virtual circuits and remote peering.
  • Infrastructure: leased waves on around 40 subsea cable systems modelled on real ones, dark fiber (leased or self-built) lit with DWDM and ZR+ optics, router generations that cap your port speeds, and LAGs to bundle ports when one isn't enough.
  • Traffic engineering: see exactly what fills each link, tune link metrics and egress preferences, and route traders over the fastest path and backups the scenic way.
  • Things break, constantly: backhoes, sharks, fat fingers, route leaks, RPKI mishaps, DDoS, cooling failures, Red Sea and Baltic cable cuts, sanctions and sovereign internet drills.

Every company is a pun. No real company names are used.

Learn how it really works

This game simplifies a lot, and gets some things gloriously wrong on purpose. For the real thing, go to How the Internet Works by Thomas Kjær Aabo (source): an interactive, zoomable map that follows your data from Wi-Fi and copper to undersea fiber, as the internet works today, in 2010 and in 1995, with simple or technical explanations. If you enjoy Series of Tubes, you will learn more from an hour there than from a year of laying cartoon fiber here.

Playing locally

It is a single static page, assembled from the files in src/ by a small Node script:

npm ci
npm run dev                   # http://localhost:8080

Progress is saved in your browser's local storage.

The game speaks English, Italian, Portuguese and French. It follows your browser's language the first time and remembers the one you pick under Settings or on the title screen.

Development

npm ci
npm run dev    # development server: assembles src/ on every request, reloads on save
npm test       # headless tests: boot, geography, a year of play, every incident, every panel
npm run build  # writes the site for GitHub Pages to _site/, with version and date stamped in
npm run i18n:check  # lists text missing from (or stale in) the translations
src/                   the game page, in pieces (joined into one index.html at build)
  index.html           the shell: <head>, static markup, @include lines
  i18n/en.js           English for every label, inlined into the page
  styles/              CSS
  game/                the game script, by topic: world, networks, simulation, actions, UI, map…
site/                  static files, deployed as they are
  i18n/it.js           Italian translation (label → text), loaded only when the game runs in Italian
  i18n/pt.js           Portuguese (Brazil) translation, loaded only when the game runs in Portuguese
  i18n/fr.js           French translation, loaded only when the game runs in French
  images/og-image.png  social preview (1200×630)
  favicon.*, icon-*    favicons, app icons, manifest
  sw.js                service worker (offline play)
  robots.txt, sitemap.xml, llms.txt, 404.html, CNAME
scripts/build.js       builds _site/ for GitHub Pages: site/ + the assembled page, stamped
scripts/lib/page.js    joins src/ into the page
tests/                 node:test + jsdom
docs/                  architecture and decisions (docs/adr/)
.github/workflows/     ci.yml (pushes to main and PRs) and release.yml (GitHub Pages deploy)

Translations

Player-facing text is keyed by label, and English is a dictionary like the others. Code says tr('pnis.ready_in_about_n_days', {n}) (or trn('save.n_pop', n) for plurals); static markup uses data-i18n="label". The English is in src/i18n/en.js, inlined into the page; each other language is a site/i18n/<lang>.js file mapping the same labels to its text, plus an entry in SOT_LANGS (the language loader in src/index.html). Missing translations fall back to English, so new text never breaks the game; npm run i18n:check lists what needs translating, and the tests make sure every translation keeps its {placeholders}, HTML tags and plural forms.

Releasing

Only published releases reach seriesoftub.es. Ordinary pushes to main run CI and nothing else; a version bump is the release button.

  1. Bump version in package.json (semver) and rename the changelog's [Unreleased] section to ## [<version>] — <date>. Write the bullets for players: the build turns that section into the in-game "What's new" card and into /version.json, which open games poll to offer a reload.
  2. Push or merge to main.

The Auto-release workflow then runs the tests, tags v<version>, publishes a GitHub release with that changelog section as notes, and starts the deploy. It does nothing when the tag already exists, and refuses a version older than the latest release or one without changelog notes. A version with a pre-release suffix (1.2.0-beta.1) becomes a pre-release and is not deployed. You can still publish a release by hand; the deploy runs the same way.

The release workflow checks that the tag matches package.json, runs the tests, builds, deploys to GitHub Pages and pings IndexNow. It refuses to build when the CHANGELOG has no ## [<version>] section (rename [Unreleased] first). Pre-releases never deploy, also not when run by hand, and a version older than the live one is refused unless you tick allow_older (a deliberate rollback). To redeploy an existing release, run the workflow manually with its tag.

Hosting setup

GitHub Pages serves the site with Source: GitHub Actions and the custom domain seriesoftub.es. Releases deploy from tags, so in Settings → Environments → github-pages → Deployment branches and tags, add a tag rule for v* (by default only the default branch may deploy). DNS for the apex domain:

seriesoftub.es.        A     185.199.108.153
seriesoftub.es.        A     185.199.109.153
seriesoftub.es.        A     185.199.110.153
seriesoftub.es.        A     185.199.111.153
seriesoftub.es.        AAAA  2606:50c0:8000::153
seriesoftub.es.        AAAA  2606:50c0:8001::153
seriesoftub.es.        AAAA  2606:50c0:8002::153
seriesoftub.es.        AAAA  2606:50c0:8003::153
www.seriesoftub.es.    CNAME fjaeckel.github.io.
stats.seriesoftub.es.  CNAME seocho.jc-ix.net.

Once DNS resolves, enable Enforce HTTPS in the repository's Pages settings.

Analytics

The game uses Ridiculytics: cookieless, no persistent identifiers, self-hosted at stats.seriesoftub.es. It only reports from seriesoftub.es itself; local copies, previews and forks stay silent. The script is pinned to ridiculytics@1.0.1 with an SRI hash.

Besides page views and session length, the game sends a few coarse events, all under the collector's 50-name cap: game_new, game_continue, play_1m … play_120m (active, unpaused play time), goal_<id>, level_2–level_4, game_year_2/3/5, win_tier1 and bankrupt.

The collector must allow the site, e.g. in sites.yaml:

sites:
  - domain: seriesoftub.es
    origins: ["https://seriesoftub.es", "https://www.seriesoftub.es"]

Community

Come hang out in the Series of Tubes Signal group. Share screenshots of your network, report bugs, suggest cities, and argue about peering policy with other players. There are fewer backhoes there than in the real thing.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md. Everyone taking part follows the Code of Conduct: be excellent to each other.

License

MIT © 2026 Frederic Jung