feat(web): fill browser window and fix localhost loading

Use a custom pygbag template: canvas uses the full window (gui_divider 1),
black page background, and redirect localhost to 127.0.0.1 because the
pygbag runtime otherwise fetches pygame from a local :8000 dev proxy and
the game never starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 23:11:40 +02:00
co-authored by Claude Opus 5.5
parent e70ee0a01d
commit 97348f884a
3 changed files with 449 additions and 2 deletions
+3 -1
View File
@@ -29,7 +29,9 @@ docker build -t silent-fh:web .
docker run -d --name silent-fh --restart unless-stopped -p 8080:8080 silent-fh:web
```
Open **http://localhost:8080**. Allow the initial runtime download to finish,
Open **http://localhost:8080** (it redirects to `127.0.0.1`, because the
Pygbag runtime treats `localhost` as its dev server). The game scales to fill
the browser window while keeping its aspect ratio. Allow the initial runtime download to finish,
click the game/name field, enter a name, and press Enter. A desktop browser
with a keyboard is recommended; touch controls are not implemented.
Reload the page to start again after quitting the game.