gpgs.multiplayer.realtime.create()

Type Function
Return value none
Revision 2017.3060
Keywords Google Play Games Services, game network, gpgs, multiplayer, real-time, create
See also gpgs.multiplayer.realtime
gpgs.multiplayer
gpgs.*

Overview

Creates a real-time room for the current game. The lifetime of the current game's connection to the room is bound to this client's lifecycle. When the client disconnects, the player will leave the room and any peer-to-peer connections for this player will be torn down. The result is delivered to the room listener defined via gpgs.multiplayer.realtime.setListeners().

Syntax

gpgs.multiplayer.realtime.create( params )
params (required)

Table. Contains parameters for the call — see the next section for details.

Parameter Reference

The params table contains parameters for the call.

playerId (optional)

String. If specified, invites only this player.

playerIds (optional)

Array. Populate with string elements to invite all specified players. If provided, this has higher priority than playerId.

automatch (optional)

Table. Specifies auto-match options — see the next section for details.

Auto-Match Parameters

minPlayers (optional)

Number. Minimum number of auto-matched players.

maxPlayers (optional)

Number. Maximum number of auto-matched players.

exclusionBits (optional)

Number. Exclusive bit masks for the auto-matching request. The logical and of each pairing of auto-matching requests must equal 0 for an auto-match.

variant (optional)

Number. This is an optional, developer-controlled parameter describing the type of game to play, used for auto-matching criteria. Must be a positive integer.