Multiplayer
Multiplayer
Multiplayer games must integrate the room and invite features. Rooms and invites need a signed-in player: for guests the calls are accepted but there is no realtime identity, so show the sign-in button before offering invites.
Required integration#
- Call
updateRoom({ roomId, isJoinable, inviteParams })whenever the player enters or changes a room. See game module. - Call
leftRoom()when they leave. - If your game lets players copy a link, build it with
inviteLink(params)instead of your own URL. - On start, read
inviteParamsand join the room it describes. Also registeraddJoinRoomListenerfor invites accepted while the game is open. - When
isInstantMultiplayeris true, skip the menu and go straight into matchmaking or a lobby.
Flow guidance#
- The first player in a session should land in a private, joinable room so a friend can join immediately.
- Round-based games keep the group together between rounds instead of sending everyone back to the menu.
- Show portal usernames in game (
getUser()and the friend list), not only anonymous ids.
Lobby size#
Enter minimum and maximum players (1 to 200) at upload; both are required for a multiplayer game. They drive the "play together" listings, and the maximum is passed to the portal as the room capacity (capped at 100). Reviewers check that the sizes match what the game really allows.
Chat and user content#
- Respect
SDK.game.settings.disableChatfully, including hiding your own input boxes and incoming text. - Chat and any user-generated content need moderation: at least a profanity filter, plus a way for players to report. Unmoderated free text is rejected.
- Never display raw HTML from other players.
Server hosting#
Real-time servers are yours. Keep the first connection fast; show matchmaking progress. If your server is down, the game must say so instead of hanging.