Persist games across reloads and announce new releases

- Autosave every five seconds while playing, plus on pagehide and when
  the tab is hidden. On load, a saved game resumes immediately (same
  speed and camera) instead of waiting behind the title screen.
- The build turns this version's CHANGELOG section into release notes:
  baked into the page for a one-time "What's new" card for returning
  players, and published as /version.json.
- Open games poll /version.json every 10 minutes and when the tab comes
  back into view; if a newer release is out, a banner offers to save
  and reload.
- "Start a new network" moves into the help screen, behind a confirm.
This commit is contained in:
Frederic Jung 2026-10-23 11:42:28 +02:00
parent b52d20e536
commit e082d6fc60
No known key found for this signature in database
9 changed files with 145 additions and 9 deletions

View file

@ -6,7 +6,7 @@
"homepage": "https://seriesoftub.es/",
"repository": { "type": "git", "url": "git+https://github.com/fjaeckel/seriesoftubes.git" },
"scripts": {
"test": "node --test tests/game.test.js tests/build.test.js",
"test": "node --test --test-concurrency=1 tests/game.test.js tests/build.test.js tests/persist.test.js",
"build": "bash scripts/build.sh",
"serve": "npm run build && npx --yes serve@14.2.4 _site"
},