Design your event lifecycle
Start, pause, report progress, end, and replay without sequence errors.
Recommended ordering
configuration → started → [progress / score / checkpoint / level_completed]
↔ paused → resumed
→ completed OR failed OR abandoned OR session_ended
→ accepted terminal → started (new server session)This is a recommended semantic flow, not a generic server state machine for all event names. Only terminal closure and V2 ordering are universally enforced by the generic handler. Built-in games may impose additional lifecycle checks.
One report at a time
The parent queues requests, but PlayIsland.event returns a UUID immediately. It does not wait for the server. Your game should track acknowledgements (or use the example helper). Never assume a function return means acceptance. After a rejected event, later sequence numbers will be rejected until the underlying state is repaired; the starter deliberately stops and asks for a reload.
Terminal events and replay
completed, failed, abandoned and session_ended end the current server session. SDK started resets the counter only after the SDK has sent a terminal name. The parent opens a new session only after it accepted the previous terminal. Wait for that acknowledgement before replay; otherwise the SDK and parent can disagree. Do not report abandoned automatically during page teardown and assume delivery: there is no reliable unload acknowledgement. A browser close may leave a session to expire.
Reward timing
The parent polls run rewards after completed/failed for signed-in users. Do not replace these with session_ended if your UX depends on the normal results screen. Paused/resumed have no built-in coin or XP effect. Use real timing and counters; server rules choose how accepted activity contributes.