gpgs.multiplayer.realtime.show()

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

Overview

Shows a view that will display a "waiting room" screen which shows the progress of participants joining a real-time multiplayer room.

Syntax

gpgs.multiplayer.realtime.show( 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.

roomId (optional)

String. The multiplayer room ID.

minPlayersRequired (optional)

Number. If desired, the waiting room can allow the user to start playing the game even before the room is fully connected, and this is controlled by the minPlayersRequired parameter. If at least this many participants including the current player are connected to the room, a "start" menu item will be enabled in the waiting room UI. Setting minPlayersRequired to 0 means that the item will always be available, while omitting this parameter will disable the item entirely. Note that if you allow any user to start early, you'll need to handle the situation by explicitly telling the other connected peers that the game is now starting.

listener (optional)

Listener. Listener function which receives a show event.