Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ HoppysAdventureArcade.exe -- --booth --route=heroes_vs_villains
./HoppysAdventureArcade.x86_64 -- --booth --route=heroes_vs_villains # Linux
```

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.
Booth mode runs fullscreen with no **Quit Game** on the hub, so staff close the window instead, and the hub shows a small QR code to the event's link. 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.

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/booth-runbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The setup does the following:
- It keeps the Mac awake and turns it back on after a power cut.
- It turns off the screen saver, automatic updates and crash dialogs.

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)).
Booth mode itself runs fullscreen, with no **Quit Game** on the hub. 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)).

## Every morning

Expand Down
5 changes: 3 additions & 2 deletions docs/builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ open -a "Hoppy’s Adventure Arcade.app" --args -- --booth --route=heroes_vs_vil
```

- **Fullscreen.** The game starts fullscreen without changing the saved settings.
- **Booth QR code.** A scannable, branded CodeRabbit link stays in the top-right corner on every route in booth mode. The provided code points to `https://coderabbit.link/ato26-ad?qr=1`, which identifies QR scans for attribution. To change the destination, regenerate `hoppys-adventure-arcade/Assets/booth/booth_qr.png` from the repository root with `swift hoppys-adventure-arcade/tools/booth/generate_qr.swift` and pass the output path and URL as optional arguments, then rebuild the game.
- **Booth QR code.** In booth mode the hub shows a small, borderless QR code between the title and Hoppy, clear of every tile and label; games don't show it. It points to `https://coderabbit.link/aidevnyc-26-booth-arcade`, the event's coupon short link for this game (`utm_content=booth-arcade`), so scans the arcade drives are counted apart from the booth's other touchpoints. For another event, create that event's own short link for the arcade, regenerate `hoppys-adventure-arcade/Assets/booth/booth_qr.png` from the repository root with `swift hoppys-adventure-arcade/tools/booth/generate_qr.swift`, passing the output path and URL as optional arguments, then rebuild the game.
- **How-to-play cards.** Each visitor's first entry into a game opens its how-to-play card. Its pages turn by themselves every 7 seconds (28 seconds at most), so it starts play on its own and never holds off the idle reset. A new visitor starts whenever the hub opens. See [main-menu.md](main-menu.md#how-to-play-cards).
- **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. (The old `--attract=` flag is still accepted so saved booth configs keep launching; it logs a warning and changes nothing.)
- **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 hub opens for the next player. The count starts again whenever the hub 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.
- **No quitting from the menu.** The menu's **Quit Game** does nothing in booth mode; staff close the window (Cmd+Q, Alt+F4).
- **No quitting from the menu.** In booth mode the hub has no **Quit Game** button or Esc quit prompt, and Esc opens nothing; staff close the window (Cmd+Q, Alt+F4).
- **Launch route.** `--route=<name>` opens a route at launch (`heroes_vs_villains`, `code_city_brawl`, `bay_area_blitz`, `orbital_ops`, `enchanted_repo`, `runner_game`, `credits`, `hub`), with or without `--booth`. An unknown name logs an error and opens the hub.
- **Low-GPU mode.** For a weak GPU such as a Raspberry Pi 5's. `--low-gpu` renders the window at the project's 1280x720 and scales it to the screen, renders the Endless Runner's 3D at 0.4 of the window's width and height instead of 0.85, turns off its glow and its corridor's two fill lights (raising the ambient light in their place), and draws its full-screen grade as a lighter overlay: the vignette, pursuit edge and letterbox stay, while the color grade, grain and speed effects go. It turns on by itself on a V3D GPU (the Pi 5), so a Pi booth needs no new flag; `--full-gpu` keeps it off there. With it on, the game logs one `LowGpu:` line with its settings at startup. `--low-gpu=<key>=<value>,...` overrides single settings for measuring, for example `--low-gpu=scale=0.75,post=full`; the keys are in `app/low_gpu.gd`. Elsewhere, and without the flag, nothing changes.
- **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.
- **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.

Expand Down
2 changes: 1 addition & 1 deletion docs/main-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The hub shows every game as a tile, three columns by two rows, so a visitor star

- **Catalog.** `scenes/main_menu/game_catalog.gd` lists the tiles in grid order: route, family eyebrow (Platformer, Endless Runner, Beat'em Up), one-line tagline, the `preview.gd` indices the tile and the showcase use (the first is the tile's art), and the Hoppy reaction. Adding a game means adding an entry there; the grid, the showcase groups and the focus map follow.
- **Tile.** `game_tile.gd` is a Button (it extends `menu_button.gd`, so it grows 5% on focus or hover) with its stage art cover-cropped inside the border, a lower scrim, the family, title and tagline, and an "ENTER / A PLAY" prompt while focused or hovered. The art is the same stage plates and runner stills the background previews use, loaded once through `preview.gd`; no separate tile art exists.
- **Navigation.** Left and right wrap within a row. Up and down step between the rows and, past them, to the utility button in the same column (Settings, Quit Game, Credits), which lead back onto the grid. Tab follows the order tiles, Settings, Quit Game, Credits (`main_menu.gd` `buttons`). Mouse hover focuses nothing but drives the preview and Hoppy; a click launches.
- **Navigation.** Left and right wrap within a row. Up and down step between the rows and, past them, to the utility button in the same column (Settings, Quit Game, Credits; booth mode has no Quit Game), which lead back onto the grid. Tab follows the order tiles, Settings, Quit Game, Credits (`main_menu.gd` `buttons`). Mouse hover focuses nothing but drives the preview and Hoppy; a click launches.
- **Launch and return.** A tile calls `AppRouter.go()` with its gameplay route, so the first entry opens the game's how-to-play card. The hub is the only menu: the per-genre menus of the three-button hub (`platformer_menu`, `runner_menu`, `beatem_menu`) and their routes (`platformer`, `runner`, `beatem_up`) are gone, and every way out of a game lands here. **Main Menu** on a game's pause menu, results, game-over or victory screen, the booth's idle return and its next-player card all call `AppRouter.go("hub")`. The runner's leaderboard moved into its pause menu (see [Pause menu](#pause-menu)).
- **Hoppy.** The menu mascot stands top right, beside the title, at two thirds of its old size. The hovered tile's family picks the reaction: platformer jump, 3D runner, brawler jab.

Expand Down
Binary file added docs/previews/booth-hub-before-after.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified hoppys-adventure-arcade/Assets/booth/booth_qr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
40 changes: 0 additions & 40 deletions hoppys-adventure-arcade/Assets/booth/booth_qr_logo.png.import

This file was deleted.

21 changes: 10 additions & 11 deletions hoppys-adventure-arcade/app/app_router.gd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const BoothLog := preload("res://app/booth_log.gd")
const BoothHeartbeat := preload("res://app/booth_heartbeat.gd")
const NextPlayerCard := preload("res://app/next_player_card.gd")
const BoothSoak := preload("res://app/booth_soak.gd")
const BoothQrOverlay := preload("res://app/booth_qr_overlay.gd")
const LowGpu := preload("res://app/low_gpu.gd")
const HowToPlay := preload("res://app/how_to_play.gd")
const HowToPlayData := preload("res://app/how_to_play_data.gd")
const ROUTES := {
Expand All @@ -20,10 +20,10 @@ const ROUTES := {
## nonzero on the first failure. tools/build/export_game.py runs it against each export.
const SMOKE_FLAG := "--smoke-routes"
const SMOKE_FRAMES := 30
## Booth mode (`<game> -- --booth`) is for unattended kiosks: the game runs fullscreen, the menu's
## Quit does nothing, and after IDLE_SECONDS without input any route returns to the hub, whose
## rotating previews are the attract screen. `--route=<name>` opens a route at launch, with or
## without --booth. Both are off unless passed.
## Booth mode (`<game> -- --booth`) is for unattended kiosks: the game runs fullscreen, the hub
## offers no way to quit and shows the booth QR code, and after IDLE_SECONDS without input any route
## returns to the hub, whose rotating previews are the attract screen. `--route=<name>` opens a
## route at launch, with or without --booth. Both are off unless passed.
const BOOTH_FLAG := "--booth"
const ROUTE_PREFIX := "--route="
const IDLE_SECONDS := 90.0
Expand Down Expand Up @@ -62,7 +62,6 @@ var next_player: NextPlayerCard
var next_player_left := 0.0
## The soak test (app/booth_soak.gd), when the game was launched with `--soak=<minutes>`.
var soak: BoothSoak
var booth_qr: Control
## How-to-play cards (app/how_to_play.gd): the first time a visitor enters a game, its card opens
## over it. A visitor starts when the hub opens, so retries and restarts skip the card. Test suites
## run with --script and get no cards unless they set this; soaks get none either.
Expand All @@ -81,11 +80,13 @@ func _ready() -> void:
veil.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
veil.mouse_filter = Control.MOUSE_FILTER_IGNORE
veil.modulate.a = 0
booth_qr = BoothQrOverlay.new()
booth_qr.visible = false
add_child(booth_qr)
add_child(veil)
var args := OS.get_cmdline_user_args()
# Low-GPU mode (app/low_gpu.gd): `--low-gpu`, or a V3D GPU unless `--full-gpu`.
LowGpu.configure(args, RenderingServer.get_video_adapter_name())
LowGpu.apply_window(get_tree().root)
if LowGpu.enabled or LowGpu.OFF_FLAG in args:
print(LowGpu.summary())
if SMOKE_FLAG in args:
smoke_routes.call_deferred()
return
Expand Down Expand Up @@ -250,8 +251,6 @@ func set_booth(enabled: bool) -> void:
# A card counting down over a paused, finished game would strand it: hand off right away.
var finishing := not enabled and next_player != null and next_player.visible
booth = enabled
if booth_qr:
booth_qr.visible = enabled
idle_seconds = 0.0
AudioService.set_attract(enabled)
game_overs = 0
Expand Down
56 changes: 0 additions & 56 deletions hoppys-adventure-arcade/app/booth_qr_overlay.gd

This file was deleted.

1 change: 0 additions & 1 deletion hoppys-adventure-arcade/app/booth_qr_overlay.gd.uid

This file was deleted.

Loading
Loading