Agents
Same rules. Then fine-tune.
This page is the human-readable form of AGENTS.md and loki://docs/integration. Installing the package is step one, not the end of the job.
Disclaimer for agents
Do not report the integration complete after npm install, lokiplay connect, or the first lokiplay ship. Each game still requires fine-tuning: inspect the real modes, confirm player counts and room type with the creator, add a usable create/join flow, tune the reducer or RealtimeProfile, and exercise reconnect and mobile. If a material field is ambiguous, stop and ask.
Hard rules
- Install
@lokiplay/sdk@0.3.8. Do not import Nakama. - Production multiplayer runs only on a Loki-hosted finished browser build.
- Upload
game.json,index.html, and static assets. No backends, secrets, ad tags, or localhost. - Never override
projectId, player identity, membership, or sequence. createRoom()/joinRoom({ inviteCode }). No invented room keys.- Add a real create/join flow. The overlay is not that flow.
- Do not invent
game.jsonfields. - Synchronized vs realtime by state progression, not animation.
- Hosted games:
createHostedLokiClient({ projectId })at boot. - Realtime: calibrate; do not copy
snapshotHzintotickRate. - Let the SDK own lifecycle. Never leave on hide/offline.
dispatch()only whileconnected.- CSP: no inline script, no remote fonts/CSS, no
<form>. validatebeforeship. Do not claim device testing you did not do.
Workflow
npm install @lokiplay/sdk@0.3.8
LOKI_API_URL=https://api.lokiplay.cc npx lokiplay@0.3.8 login
npx lokiplay@0.3.8 connect --project <uuid>
npx lokiplay@0.3.8 ship
Package install does not need Loki credentials. Login does. Stop on auth or deploy errors.
Machine-readable: MCP, /llms.txt, /llms-full.txt.