You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7cdd9c
Browse filesBrowse the repository at this point in the historyBrowse files
feat(booth): send idle and finished players back to the attract screen (#81)
* feat(booth): send idle and finished players back to the attract screen
[Agent: Claude Code | Model: Opus 5.5 | Thinking: High | Acting on behalf of: Erik | Skill: none]
At a booth, a lost game offers the same player unlimited retries while
the line waits, and the idle return always goes to the hub.
Booth mode only; outside it every game keeps its own retry screen.
- --attract=<route> (default hub) is where the idle return and finished
players go. Unknown names fall back to the hub with a warning.
- Games call AppRouter.booth_game_over(score_line) at game over. A
booth player gets --retries=<n> retries (default 0); after that the
call returns true, the game skips its retry screen, and the router
lays app/next_player_card.gd over it: GAME OVER, the game's score,
"Thanks for playing!" and a six-second countdown, then the attract
route opens. The count resets whenever the attract route opens. The
session log records those endings as game_over.
- One hook per game-over path, in Juan's and Trey's scripts:
Heroes vs. Villains and Code City Brawl game_over(), the platformer's
_reveal_results() on a loss, and the runner's game-over screen.
- tools/booth/macos/setup.sh passes anything after -- to the game, so
staff can set --retries or --attract in the login item.
- tests/booth_routing.gd drives each game's real game-over path in and
out of booth mode, the retry allowance, the card, the attract and
idle routes and the session-log endings. Child launches go through
tests/support/child_game.gd, which kills a child that overruns.
* fix(booth): limit attract routes to menus, count losses per session, finish the card on exit
[Agent: Claude Code | Model: Opus 5.5 | Thinking: High | Acting on behalf of: Erik | Skill: none]
Addresses CodeRabbit review 5541793941 on #81:
- --attract accepts only hub, beatem_up and runner: menus that wait for
a player and start their own music. A game route would play by
itself, collide with native retries and same-game sessions, and the
platformer menu would be silent after a beat 'em up.
- booth_game_over() declines while a route change is under way, which
would otherwise hide the fresh card.
- Turning booth mode off while the card counts down hands off to the
attract route at once instead of stranding a paused game.
- The session log counts each session's losses (game_overs), so stage
retries that stay in the game show up; the report adds the column.
- setup.sh appends the arguments left after -- directly.
- tests/booth_routing.gd drives the real runner game (isolated
leaderboard) through run_finished, checks the six-second start, a
takeover during a route change, booth mode off mid-countdown and the
loss count, asserts the child's exit code, and gives the child its
own session-log folder. The runbook row covers configured retries.
./HoppysAdventureArcade.x86_64 -- --booth --route=heroes_vs_villains # Linux
41
41
```
42
42
43
-
Booth mode runs fullscreen and ignores the menu's **Quit Game**, so staff close the window instead. After 90 seconds without input, any game returns to the hub's attract screen. [Run it at a booth](docs/builds.md#run-it-at-a-booth) lists every route and flag.
43
+
Booth mode runs fullscreen and ignores the menu's **Quit Game**, so staff close the window instead. After 90 seconds without input, any game returns to the hub's attract screen, and a lost game sends the player there after a thank-you card instead of offering endless retries. [Run it at a booth](docs/builds.md#run-it-at-a-booth) lists every route and flag.
44
44
45
45
For a machine that runs unattended all day, follow the [booth runbook](docs/booth-runbook.md). It sets up a watchdog that restarts the game if it closes or freezes, along with the Mac's kiosk settings, and covers the staff checklist.
Nothing changes yet. To apply it, run the same command with `--apply` and enter the administrator password when asked. The game starts.
20
+
Nothing changes yet. To apply it, run the same command with `--apply` and enter the administrator password when asked. The game starts. To give each player a retry or change the attract screen, add game flags after `--`, for example `-- --retries=1 --attract=beatem_up` ([booth flags](builds.md#run-it-at-a-booth)).
21
21
4. Do the manual steps the script lists at the end: automatic login, Do Not Disturb, the display, the volume and the controllers.
22
22
5. Restart the Mac. The game should start on its own within a minute.
23
23
@@ -27,7 +27,7 @@ The setup does the following:
27
27
- It keeps the Mac awake and turns it back on after a power cut.
28
28
- It turns off the screen saver, automatic updates and crash dialogs.
29
29
30
-
Booth mode itself runs fullscreen, ignores the menu's **Quit Game**, and sends a game nobody has touched for 90 seconds back to the hub's attract screen ([details](builds.md#run-it-at-a-booth)).
30
+
Booth mode itself runs fullscreen and ignores the menu's **Quit Game**. A game nobody has touched for 90 seconds goes back to the hub's attract screen, and so does a lost game, after a thank-you card for the player ([details](builds.md#run-it-at-a-booth)).
31
31
32
32
## Every morning
33
33
@@ -40,6 +40,7 @@ Booth mode itself runs fullscreen, ignores the menu's **Quit Game**, and sends a
40
40
| What happens | What you'll see |
41
41
|---|---|
42
42
| A player walks away mid-game | After 90 seconds the game returns to the hub. |
43
+
| A player loses | Once they have used any retries you set (none by default), a **GAME OVER** card thanks them and shows their score. After six seconds the attract screen (the hub unless you set another) opens for the next player. |
43
44
| The game crashes or closes | The watchdog opens it again within a few seconds. |
44
45
| The game freezes | The watchdog restarts it within about a minute. |
45
46
| Someone presses Cmd+Q | The game closes, and the watchdog opens it again. |
Copy file name to clipboardExpand all lines: docs/builds.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,11 +33,12 @@ open -a "Hoppy’s Adventure Arcade.app" --args -- --booth --route=heroes_vs_vil
33
33
```
34
34
35
35
-**Fullscreen.** The game starts fullscreen without changing the saved settings.
36
-
-**Idle reset.** After 90 seconds with no keyboard, mouse, touch or controller input, any game returns to the hub, whose rotating previews act as the attract screen.
36
+
-**Idle reset.** After 90 seconds with no keyboard, mouse, touch or controller input, any game returns to the attract route. That is the hub, whose rotating previews act as the attract screen, unless `--attract=` names `beatem_up` or `runner`, the other menus that start their own music.
37
+
-**Game over.** A lost game doesn't offer unlimited retries. A player gets `--retries=<n>` retries (default 0); after that, the game shows no retry screen. Instead a **GAME OVER** card thanks the player, shows their score and counts down six seconds, then the attract route opens for the next player. The count starts again whenever the attract route opens. Every game takes part: Heroes vs. Villains, Code City Brawl, the platformer levels and the Endless Runner. Without `--booth`, every game keeps its own retry screen.
37
38
-**No quitting from the menu.** The menu's **Quit Game** does nothing in booth mode; staff close the window (Cmd+Q, Alt+F4).
38
39
-**Launch route.**`--route=<name>` opens a route at launch (`heroes_vs_villains`, `code_city_brawl`, `bay_area_blitz`, `orbital_ops`, `enchanted_repo`, `runner`, `platformer`, `beatem_up`, `hub`), with or without `--booth`. An unknown name logs an error and opens the hub.
39
40
-**Keep it running.**`tools/booth/watchdog.sh` relaunches the game whenever it exits and restarts it when it hangs. The watchdog passes `--heartbeat=<path>`, which makes the game rewrite that file with the current time every two seconds; a file that stops changing means the game is stuck. On a Mac, `tools/booth/macos/setup.sh` installs the watchdog as a login item and applies the kiosk settings. The [booth runbook](booth-runbook.md) walks staff through setup, the show days and recovery.
40
-
-**Session log.** Booth mode records each game session's start and end in `user://booth/`, one file per run of the game (`sessions-<date and time>-<process id>.jsonl`). Each entry records the game, the local start and end times, the duration, how the session ended (`menu`, `idle`or `quit`) and how many times the player retried. It records nothing about players and never uses the network. A start with no end means the game stopped without quitting: a crash, a power cut or a forced kill. The game prints its file's full path at startup. `--session-log=<folder>` writes to another folder and works without `--booth`, for playtests.
41
+
-**Session log.** Booth mode records each game session's start and end in `user://booth/`, one file per run of the game (`sessions-<date and time>-<process id>.jsonl`). Each entry records the game, the local start and end times, the duration, how the session ended (`menu`, `idle`, `game_over`or `quit`), how many times the player re-entered the game, and how many times they lost (`game_overs`, stage retries included). It records nothing about players and never uses the network. A start with no end means the game stopped without quitting: a crash, a power cut or a forced kill. The game prints its file's full path at startup. `--session-log=<folder>` writes to another folder and works without `--booth`, for playtests.
41
42
42
43
`user://` is `~/Library/Application Support/Godot/app_userdata/Hoppy’s Adventure Arcade/` on macOS, `%APPDATA%\Godot\app_userdata\Hoppy’s Adventure Arcade\` on Windows and `~/.local/share/godot/app_userdata/Hoppy’s Adventure Arcade/` on Linux. To summarize the logs, copy each machine's `booth` folder and run:
0 commit comments