Commit Graph
5 Commits
Author SHA1 Message Date
jensandClaude Sonnet 5 3332553cb5 Give each running game its own screen, capped at 10 concurrent
Previously every game shared one always-on Xvnc/fluxbox/websockify
desktop, so starting two games at once meant they fought over focus on
the same screen and the same ALSA device. Now:

- server.sh no longer starts a shared desktop at all - it just runs
  setup_server.py. There's no default display anymore.
- start_game() allocates a free display from GAME_DISPLAY_NUMS
  (:90-:99, one per MAX_CONCURRENT_GAMES=10 slot), spins up a fresh
  Xvnc+fluxbox+websockify for it, and launches the game with DISPLAY set
  to that display. All four processes are tracked together per game.
- stop_game() tears down all four; is_running() does the same lazily if
  the game exited on its own (crash/quit), so a slot doesn't stay stuck
  just because nobody clicked Stop.
- Starting past the 10-slot cap is refused with an error shown on that
  game's row instead of silently failing.
- Each running game's row gets its own "Open Screen" link (client-side
  JS, since the port is only known once the game is actually started)
  instead of one global noVNC link.
- run.sh publishes the whole 8090-8099 noVNC port range up front, since
  Docker can't add port mappings to an already-running container.

Verified end-to-end: two different games running concurrently get fully
independent Xvnc/fluxbox/websockify/game process sets and noVNC
endpoints; stopping one leaves the other untouched; the capacity guard
correctly refuses a start at the limit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
2026-07-28 15:25:00 +02:00
jensandClaude Sonnet 5 53f36cca8e Publish the noVNC game-screen port in run.sh
8099 (80${DISPLAY_NUM}) was never published to the host, only the 7099
setup UI was - the game screen was unreachable outside the container.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
2026-07-28 10:32:15 +02:00
jensandClaude Sonnet 5 c6ae36ba67 Replace auto-download with an interactive HTML game setup UI
No games are fetched at container start anymore. scripts/setup_server.py
is a small stdlib-only Python HTTP server, started alongside Xvnc/fluxbox/
websockify, serving an HTML page on ${SETUP_PORT} (70${DISPLAY_NUM},
published as 7099 by run.sh) that lists every *.zip found live on the SMB
share with an Installed/Install status per game. Clicking Install
downloads and extracts just that game into ${GAMES_HOME} on demand.
Replaces the old fetch_games.sh, which unconditionally pulled every game
on first start.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
2026-07-28 08:37:12 +02:00
jensandClaude Sonnet 5 44bbd00336 Fetch games into a volume at runtime instead of baking them into the image
927MB of the image was just t7g's two CD ISOs, which can't be meaningfully
compressed (already-compressed FMV/audio). Move the smbget/unzip step out
of the Dockerfile and into scripts/fetch_games.sh, run from server.sh on
container start: it populates GAMES_HOME on first run and skips the fetch
if games are already present. run.sh mounts a named volume so the games
survive --rm restarts instead of being re-downloaded every time. Image
drops from 1.6GB to ~690MB; first container start now needs network access
to the vlda-01 SMB share to seed the volume.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
2026-07-28 08:25:26 +02:00
jens 2a3eb9218e Initial commit 2024-05-31 19:13:10 +02:00