Game lifecycle
Your game is one panel in a feed the player is swiping through, so it starts, pauses, loses focus and resumes without ever being unloaded. These are the hooks for each of those moments.
Loading screen
The platform can only see when your documentfinished parsing, which for a game that then decodes audio or builds levels is far too early — the player stares at a live but empty panel. Report progress and the platform shows a proper loading screen with your title, and holds the game paused until you say it's ready.
Audio & focus
Players swipe between games constantly, and two games playing music at once is the fastest way to get closed. The platform pauses off-screen games, but it cannot reach inside your audio graph — you have to stop your own sound on tiptap:blur. The platform also has a global mute toggle, and canPlayAudio() folds both conditions into one check.
Window events
The platform fires these on window as the player moves through the feed. Use whichever style fits — every one has a callback equivalent above.
Arcade view
Sharing
Offer a share at the moments that earn it — a personal best, a first clear, a run worth showing — from a button on your own end screen. Firing it automatically at every game over throws UI over the player and teaches them to dismiss your end screen without reading it. If you pass no picture the platform generates a branded score card with the score, the game and the player on it.

