๐ Cozy Parrot Runbook
Idiot-proof local run + playtest. Always cd games/cozy-parrot first.
See also: Index ยท Architecture ยท Opcodes
โ Prerequisites
- Docker installed and running
- pnpm โฅ 9 (Node โฅ 20)
- Free ports 17350 (API), 17351 (console), 18080 (Cockroach UI)
Nakama default
7350often collides withkubectlโ this stack uses 17350.
๐ ๏ธ Run steps
- Install โ
pnpm install - nakama:build โ
pnpm nakama:build - Copy
build/index.jsโnakama/data/modules/build
mkdir -p nakama/data/modules/build && cp nakama/runtime/build/index.js nakama/data/modules/build/index.js - Docker โ
docker compose -f nakama/docker-compose.yml up -d - Frontend
.envโPUBLIC_NAKAMA_PORT=17350(from.env.exampleif needed) - Dev โ
pnpm --filter frontend devโ open the printed URL
๐ฎ Playtest checklist
- Two tabs: Host Match (A) โ paste Match ID โ Join (B)
- WASD moves both parrots
- Space grabs the token for the correct blank in the prompt
- Throw into the golden hopper (Context Window)
- HUD: prompt blanks, timer, live scores
- result phase shows ranking after play (~60s)
๐ฌ Verify commands
| Check | Command / expectation |
|---|---|
| Frontend check | pnpm --filter frontend check โ clean |
| nakama:build | pnpm nakama:build โ nakama/runtime/build/index.js |
| docker ps healthy | docker compose -f nakama/docker-compose.yml ps / docker ps โ nakama + cockroachdb healthy |
| E2E_OK | Headless two-player host/join/grab/throw vs API :17350 prints E2E_OK |
๐ฉน Troubleshooting
| Symptom | Fix |
|---|---|
Port conflict with kubectl / 7350 | Use 17350; set PUBLIC_NAKAMA_PORT=17350 |
Goja __assign / object spread | Remove spreads in runtime JS; rebuild + copy module |
| Inline RPC fail | Use a named function, then register that name |
| Module not loading / stale logic | Rebuild + cp into nakama/data/modules/build + restart Nakama |