How integration works
Understand the iframe boundary, launcher, validation and asynchronous rewards.
Hosted game architecture
Game in isolated iframe
window.PlayIsland → postMessage
Parent Play Island launcher → authenticated play-event request
Registered schema + session validation → durable accepted event
Signed-in player → outbox worker → eligible reward rules → receipts
Guest → event acknowledgement; no account reward grantThe launcher creates a server session tied to the game and immutable release. The server keeps a hash of a random play token. Only the parent uses that token in X-Play-Token; it is not sent into the iframe. Hosted HTML delivery injects play-island-sdk.js immediately after the head tag. SDK messages use the configured platform origin; the parent checks the sending frame.
Implemented, conditional and unsupported
| Capability | Current state |
|---|---|
| Hosted HTML5 / WebAssembly ZIPs | Implemented with isolated asset delivery |
| V2 event bridge and acknowledgements | Implemented; registration required per game |
| Rewards and receipts | Server-owned, signed-in, asynchronous, rule/cap dependent |
| Config, preferences and room context | Implemented; room context is optional |
| Saves, exit and leaderboard SDK actions | Restricted to specific bundled slugs |
| Signed server events | Implemented; staff-provisioned key and authoritative validation required |
| External hosted URLs | Staff allowlist and HTTPS required; no automatic SDK injection |
| Universal engine SDK packages | Not implemented; downloads here are source adapters |
| Public developer event sandbox | Not implemented; provider preview is visual-only |
| Automatic reward minting from browser data | Unsupported |
Session and reward boundaries
Generic sessions expire after two hours or a terminal event. The server permits at most 1000 accepted events per session. completed, failed, abandoned and session_ended close a run. The SDK resets its sequence when started follows a terminal report; the parent creates the new session after an accepted terminal. Always wait for acceptance before starting another run. The worker evaluates published rule snapshots for signed-in players. Rules may be capped, ineligible, held for review or yield no reward. Guests can report gameplay, but do not get account rewards. Browser scores are unverified; a plausible browser report does not become authoritative proof.
Source of truth
Contracts are implemented in packages/game-sdk, packages/contracts, packages/platform/src/games.ts and reward-engine.ts, with the parent bridge in apps/web/components/games.tsx. This center's event inspector reads published schemas from the database. New prose never changes game behavior.