kart: document the phone-first game in AGENTS and listing
- Commit
7e8df5ca0d41472402619595ebd79e851a74d8a0- Author
- Vayun Mathur <[email protected]>
- When
- 2026-12-05 13:45 UTC (18 hours ago)
- Parents
78e925f
games/kart/AGENTS.md, the store listing and the root app index still described (or omitted) the old TV shape. - games/kart/AGENTS.md: phone purpose, solo-vs-bots and LAN-host game shape, arm64-only native note, the pairing-code lobby behaviour, TouchControls in the key files, and the install default corrected to release like every other module. - metadata_data/games-kart.md: listing leads with phone racing against AI and LAN hosting instead of TV-first controller play. - Root AGENTS.md app index gains the missing games-kart entry.
Diff
AGENTS.md
diff --git a/AGENTS.md b/AGENTS.mdindex e69c79b7b5..978b77e0d0 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -50,7 +50,7 @@ Monorepo: ~100 Gradle modules + Rust workspace. Do scoped work only. Reference: `backup/` satisfies every rule; `notes/` second + `intents/` demo. `camera` + `games/voxels` hand-commit screenshots. Full canonical index (Gradle key → dir + group + notes): `.llms/repo-map.md`. `clock`, `notes`, `calendar`, `launcher`, `todo`, `maps`, `camera`, `findfamily`, `contacts`, `appstore`, `weather`, `communicate` and `music` are single merged APKs for phone and watch (watch experience inside the phone app's module; the remaining `*-wear` modules are separate companion APKs with the phone app's applicationId/signing).-`appstore→appstore/` `astronomy→astronomy/` `auto→auto/,auto/protocol/` `backup→backup/` `calculator→calculator/` `calendar→calendar/` `camera→camera/` `cast→cast/,cast/protocol/,cast/tv/` `clock→clock/` `code→code/` `communicate→communicate/` `contacts→contacts/` `education→education/` `email→email/` `emergency→emergency/` `euicc→euicc/` `everysync→everysync/` `files→files/` `findfamily→findfamily/` `findfamily-ios→apple/FindFamily/` (SwiftPM/xtool, not Gradle) `flashcards→flashcards/` `fooddelivery→fooddelivery/` `health→health/` `keyboard→keyboard/` `launcher→launcher/` `logviewer→logviewer/` `maps→maps/` `measure→measure/` `music→music/` `networklocation→networklocation/` `news→news/` `notes→notes/` `office→office/` `openassistant→openassistant/` `passwords→passwords/` `pdf→pdf/` `photos→photos/` `parentalcontrols→parentalcontrols/` `screentime→screentime/` `setupwizard→setupwizard/` `share→share/` `speech→speech/` `taxi→taxi/` `things→things/` `todo→todo/` `translate→translate/` `travel→travel/` `tuner→tuner/` `updater→updater/` `vpn→vpn/` `weather→weather/` `watch→watch/,watch-wear/` `web→web/` `youpipe→youpipe/,youpipe/extractor/` `games-hub→games/hub/` `games-arrows→games/arrows/` `games-chess→games/chess/` `games-logicgate→games/logicgate/` `games-minesweeper→games/minesweeper/` `games-nonogram→games/nonogram/` `games-pipes→games/pipes/` `games-solitaire→games/solitaire/` `games-sudoku→games/sudoku/` `games-unblockjam→games/unblockjam/` `games-voxels→games/voxels/` `games-wordmaker→games/wordmaker/`+`appstore→appstore/` `astronomy→astronomy/` `auto→auto/,auto/protocol/` `backup→backup/` `calculator→calculator/` `calendar→calendar/` `camera→camera/` `cast→cast/,cast/protocol/,cast/tv/` `clock→clock/` `code→code/` `communicate→communicate/` `contacts→contacts/` `education→education/` `email→email/` `emergency→emergency/` `euicc→euicc/` `everysync→everysync/` `files→files/` `findfamily→findfamily/` `findfamily-ios→apple/FindFamily/` (SwiftPM/xtool, not Gradle) `flashcards→flashcards/` `fooddelivery→fooddelivery/` `health→health/` `keyboard→keyboard/` `launcher→launcher/` `logviewer→logviewer/` `maps→maps/` `measure→measure/` `music→music/` `networklocation→networklocation/` `news→news/` `notes→notes/` `office→office/` `openassistant→openassistant/` `passwords→passwords/` `pdf→pdf/` `photos→photos/` `parentalcontrols→parentalcontrols/` `screentime→screentime/` `setupwizard→setupwizard/` `share→share/` `speech→speech/` `taxi→taxi/` `things→things/` `todo→todo/` `translate→translate/` `travel→travel/` `tuner→tuner/` `updater→updater/` `vpn→vpn/` `weather→weather/` `watch→watch/,watch-wear/` `web→web/` `youpipe→youpipe/,youpipe/extractor/` `games-hub→games/hub/` `games-kart→games/kart/` `games-arrows→games/arrows/` `games-chess→games/chess/` `games-logicgate→games/logicgate/` `games-minesweeper→games/minesweeper/` `games-nonogram→games/nonogram/` `games-pipes→games/pipes/` `games-solitaire→games/solitaire/` `games-sudoku→games/sudoku/` `games-unblockjam→games/unblockjam/` `games-voxels→games/voxels/` `games-wordmaker→games/wordmaker/` Slash == colon for Gradle (`games/voxels` == `games:voxels`). ### Never scan
games/kart/AGENTS.md
diff --git a/games/kart/AGENTS.md b/games/kart/AGENTS.mdindex 2d5d3b533d..0b514e1e82 100644--- a/games/kart/AGENTS.md+++ b/games/kart/AGENTS.md@@ -2,7 +2,7 @@ > Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `games/kart/` + allowed shared modules. Do not root-scan. -_Install: ./install games/kart (dev by default)._+_Install: ./install games/kart (release by default)._ - Gradle: :games:kart / dir: games/kart/ - Package roots present: data, domain, platform, ui - Entry files: MainActivity.kt, Route.kt, Navigation.kt@@ -11,13 +11,13 @@ _Install: ./install games/kart (dev by default)._ - Rust: yes / screenshotTest: yes ## Overview-**Purpose:** 3D kart racer (Sunset Oval) — native Rust engine (Vulkan, with a GLES fallback for 32-bit TV hardware), kart physics, chase cam, items and AI; phones join as controllers.-**Game shape:** `Route` (`Lobby` / `Race` / `Results`) → `platform/KartViewModel` → `domain/` race/input rules + `platform/KartHost` (`:sdk:controller` lobby fan-in) → `platform/KartNative` → `src/main/rust/` engine; achievements → `:sdk:games` → hub.+**Purpose:** 3D kart racer (Sunset Oval) for phones — native Rust engine (Vulkan, with a GLES fallback for devices without Vulkan), kart physics, chase cam, items and AI. Played solo against AI drivers or over LAN: this phone hosts the race, other phones join as extra drivers from the Games Hub app.+**Game shape:** `Route` (`Lobby` / `Race` / `Results`) → `platform/KartViewModel` → `domain/` race/input rules + `platform/KartHost` (`:sdk:controller` lobby fan-in) → `platform/KartNative` → `src/main/rust/` engine; achievements → `:sdk:games` → hub. Local input (touch + gamepad) is recorded by the ViewModel itself and merged over the host fan-in, so solo races drive even when the LAN host is down. **Entry points:** `Route` → `MainActivity.kt` → `Navigation.kt` → `ui/KartGameScreen.kt` → `platform/KartViewModel.kt` → `platform/KartNative.kt` / `domain/PlaceholderRace.kt`. **Gotchas:**-- Native Rust: crate `kart_engine` in `src/main/rust/` (engine/physics/track/mesh/items + `vulkan/` and `gles/` renderers, GLSL `kart.vert`/`kart.frag` compiled at runtime by the GLES path). `rustNativeLib` also opts into `armeabi-v7a` for the ONN 4K box (32-bit, Mali-G31, no Vulkan) — the only such game; don't drop the armv7 ABI.+- Native Rust: crate `kart_engine` in `src/main/rust/` (engine/physics/track/mesh/items + `vulkan/` and `gles/` renderers, GLSL `kart.vert`/`kart.frag` compiled at runtime by the GLES path). Phone-only: arm64 like every other app; the GLES renderer is the non-Vulkan fallback. - `platform/KartNative` is the sole `kart_engine` wrapper: every call is gated on `KartNative.isAvailable`; without the `.so` the game runs `domain/PlaceholderRace` — never call native entry points unguarded.-- Controller dep IS present (`:sdk:controller`): `platform/KartHost` advertises `_gamepad._tcp`, accepts phones and fans `ControllerInput` into the race loop (`domain/GameInputLoop`); `platform/GamepadDirect` handles a locally attached gamepad in `MainActivity`. PQC identity stays behind lambdas in `KartHost` — this module never touches the `:library:e2ee-p2p` native library directly.+- Controller dep IS present (`:sdk:controller`): `platform/KartHost` advertises `_gamepad._tcp`, accepts phones and fans `ControllerInput` into the race loop (`domain/GameInputLoop`); `platform/GamepadDirect` handles a locally attached gamepad in `MainActivity`. PQC identity stays behind lambdas in `KartHost` — this module never touches the `:library:e2ee-p2p` native library directly. The host's pairing code is mirrored into `KartHost.pairingCodeFlow` and shown in the lobby while a phone pairs — without it, first-time LAN joins cannot complete. - Listing images are hand-captured — Layoutlib can't render the Vulkan surface; `src/screenshotTest` previews cover only the non-surface UI. - `KartDataStore` (`data/`) is the sole prefs owner (cup pointer + lifetime counters); countdown is in-screen state of `Route.Race`, not a destination. @@ -35,6 +35,7 @@ _Install: ./install games/kart (dev by default)._ - com/vayunmathur/games/kart/domain/GameInputLoop.kt - com/vayunmathur/games/kart/domain/PlaceholderRace.kt - com/vayunmathur/games/kart/domain/RumbleDecider.kt+- com/vayunmathur/games/kart/domain/TouchControls.kt — held touch state → `KartControl` / `ControllerInput` encoding ### platform/ — ViewModel, native wrapper, controller host - com/vayunmathur/games/kart/platform/KartViewModel.kt - com/vayunmathur/games/kart/platform/KartNative.kt — sole guarded `kart_engine` wrapper
metadata_data/games-kart.md
diff --git a/metadata_data/games-kart.md b/metadata_data/games-kart.mdindex 4c865f1ff7..ab62c733e4 100644--- a/metadata_data/games-kart.md+++ b/metadata_data/games-kart.md@@ -1,9 +1,9 @@-A TV-first kart racer played with phones as controllers+A kart racer for your phone: race cups against AI drivers, or host a LAN race and let friends join from their phones Features:-- Race cups of four tracks against AI drivers-- Phones with the games hub app join as controllers over the local network-- Physical Android gamepads work on the TV too, side by side with phones+- Race cups of four tracks against AI drivers with on-screen touch controls+- Host a race on this phone; friends join over the local network from the Games Hub app and race beside you+- Physical Android gamepads work too, side by side with touch and phones - Items, drift boosts, and a chase camera once the 3D engine lands 100% offline