Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
cov/c3 ▾

Modern-Apps.git / games / voxels / AGENTS.md

AGENTS.md3.6 KiBRenderedCodeRaw
1# AGENTS.md — games/voxels/ (':games:voxels')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `games/voxels/` + allowed shared modules. Do not root-scan.
4
5_Install: ./install games/voxels (dev by default)._
6<!-- last-reviewed: 2026-10-16 -->
7- Gradle: :games:voxels / dir: games/voxels/
8- Package roots present: ui, data, platform, network
9- Entry files: MainActivity.kt + platform/MenuActivity.kt (menu/world select; no Route.kt)
10- Deps: :sdk:games, :library:network, :library:e2ee-p2p
11- Metadata: metadata_data/games-voxels.md (present)
12- Rust: yes / screenshotTest: hand-committed
13
14### Relay server (backend, outside this repo)
15Host: `api.maproj.org` (Cloudflare FIRST_PARTY pins). Server checkout: `../location_share_server` (sibling of this repo root, `C:\Users\Vayun\Documents\code\location_share_server`). Live SSH: `ssh [email protected]`. Env template: `../location_share_server/.env.example` (copy to `.env`, never commit secrets). Full details: root `AGENTS.md` → "Backend server (outside this repo)".
16
17## Overview
18**Purpose:** Voxel sandbox on a hand-written Rust + Vulkan engine — infinite procedural worlds (25 biomes, villages), crafting/fishing/trading, saves, optional E2EE multiplayer through an untrusted relay. 19 languages.
19**NOT a standard MA game:** `ui/` is thin Compose chrome (menus, inventory, hotbar, joystick) over `VoxelSurfaceView`; the world, physics and rendering live in Rust behind `platform/VoxelsNative`. Multiplayer sync (`network/VoxelsSync`) reuses the everysync E2EE-relay pattern.
20**Entry points:** `MainActivity.kt` → `platform/MenuActivity.kt` (`parseJoinLink`-style world invites live here, mirroring everysync) → `ui/VoxelSurfaceView.kt` → `platform/VoxelsNative.kt` → `data/WorldManager.kt`.
21**Gotchas:**
22- Screenshots are hand-committed (Layoutlib can't render Vulkan) — never expect `:metadata` to regenerate them
23- Engine bugs are Rust bugs — scope Kotlin-side work to `ui/`/`platform/` glue unless the trace crosses JNI
24- Multiplayer is E2EE through an untrusted relay — relay sees ciphertext only; keep it that way
25
26## Key files
27### Root + platform/ — entry, menus, Rust bridge
28- com/vayunmathur/games/voxels/MainActivity.kt
29- com/vayunmathur/games/voxels/platform/MenuActivity.kt — world select + invites
30- com/vayunmathur/games/voxels/platform/VoxelsNative.kt — JNI bridge (Kotlin side is glue)
31- com/vayunmathur/games/voxels/platform/VoxelsAchievementsManager.kt
32- com/vayunmathur/games/voxels/platform/AppBackupAgent.kt
33- com/vayunmathur/games/voxels/platform/SoundFx.kt
34- com/vayunmathur/games/voxels/platform/MusicFx.kt
35### data/ + network/ — worlds + E2EE sync
36- com/vayunmathur/games/voxels/data/WorldManager.kt
37- com/vayunmathur/games/voxels/network/VoxelsSync.kt — relay sync (everysync pattern)
38### ui/ — menus, inventory, HUD (thin chrome over the engine)
39- com/vayunmathur/games/voxels/ui/VoxelSurfaceView.kt
40- com/vayunmathur/games/voxels/ui/MenuScreens.kt
41- com/vayunmathur/games/voxels/ui/InventoryScreen.kt
42- com/vayunmathur/games/voxels/ui/InventoryCrafting.kt
43- com/vayunmathur/games/voxels/ui/InventoryBlessings.kt
44- com/vayunmathur/games/voxels/ui/Hotbar.kt
45- com/vayunmathur/games/voxels/ui/Joystick.kt
46- com/vayunmathur/games/voxels/ui/FurnaceScreen.kt
47- com/vayunmathur/games/voxels/ui/StonecutterScreen.kt
48- com/vayunmathur/games/voxels/ui/TradeScreen.kt
49- com/vayunmathur/games/voxels/ui/VoxelCatalog.kt
50- com/vayunmathur/games/voxels/ui/Theme.kt — game theme (not DynamicTheme)
51
52## Verify (this module only)
53```
54./gradlew :games:voxels:compileDevKotlin
55./gradlew :games:voxels:lint
56./gradlew :games:voxels:checkMetadata
57```