Session states
A game session transitions through the following states.Session creation
When a user connects through the PlayWave launcher,LaunchData contains the OTT.
POST /v1/game/session/verify to verify it. On success, the game_session_id is returned and the session becomes ACTIVE.
Users connecting without the PlayWave launcher will have empty
LaunchData. In this case, verification is skipped and the user is treated as a normal player.Heartbeat
Once the session isACTIVE, heartbeats are sent every 2 minutes (120 seconds).
Heartbeat response handling
Heartbeat error handling
Session termination
Sessions can end in 6 ways.1. Normal exit (normal)
When a user leaves the game, the session end API is called in thePlayerRemoving event.
2. Server shutdown (BindToClose)
When the Roblox server shuts down, all active sessions are cleaned up.3. Heartbeat timeout (heartbeat_timeout)
If no heartbeat is received for 4 minutes, the server automatically terminates the session. This covers cases like PC power-off or network failure.4. Session replace (session_replace)
If a different game is launched from the same PC, the existing game session is auto-terminated and a new session is created. The heartbeat for the old session will returnSESSION_REPLACED.
5. Launcher heartbeat timeout
The server checks launcher liveness during game server heartbeats. If the launcher hasn’t sent a heartbeat for over 4 minutes, the server terminates the game session (returns HTTP410). This happens when the launcher crashes or is force-closed while the game is still running.
6. G-coin exhausted (charge_exhausted)
WhenCHARGE_EXHAUSTED is received in a heartbeat response, the server auto-terminates the session after a 2-minute grace period.