Served with isolation headers; start-screen capability notices; tests on the real GPU (t88 phase 1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 19:11:42 -04:00
co-authored by Claude Opus 5.5
parent 9781aa3ee1
commit b2c9ad9533
22 changed files with 376 additions and 91 deletions
+24 -4
View File
@@ -15,8 +15,28 @@ python3 build.py
python3 tools/serve.py # builds, serves at http://localhost:8000 and rebuilds when src/ changes
```
Opening `dist/index.html` directly works too. The game is one self-contained page with no
downloads; sound and graphics are all generated in code. Saves stay in your browser.
The game must be served: use `python3 tools/serve.py` locally, or serve `dist/` with any web
server that sends these headers. Opening `dist/index.html` from disk is no longer supported.
Use HTTPS when hosting remotely (localhost works over HTTP).
nginx, in the site's `server` or `location` block:
```nginx
add_header Cross-Origin-Opener-Policy same-origin always;
add_header Cross-Origin-Embedder-Policy require-corp always;
```
Caddy, in the site block alongside `root * /path/to/dist` and `file_server`:
```caddyfile
header {
Cross-Origin-Opener-Policy same-origin
Cross-Origin-Embedder-Policy require-corp
}
```
These are plain static files, so a small server is enough. The game is one self-contained page
with no downloads; sound and graphics are generated in code. Saves stay in your browser.
- To keep or move a world, use Pause → Export world file.
- To load one, use Settings → Load a world file on the title screen, or Pause → Import world file
during a game. World files exported from the claude.ai version load here too.
@@ -36,11 +56,11 @@ You need Node (tested with 22), Python 3, and Playwright for the browser tests a
```sh
uv venv .venv
uv pip install --python .venv/bin/python -r requirements.txt
.venv/bin/python -m playwright install chromium
.venv/bin/python -m playwright install chromium firefox
```
If uv is not installed, `python3 -m venv .venv` and
`.venv/bin/pip install -r requirements.txt` also work; then install Chromium as above.
`.venv/bin/pip install -r requirements.txt` also work; then install the browsers as above.
After that, plain `python3` works for every command below; the browser scripts switch to
`.venv` on their own.