new ClusterRoomSettings(name)

Creates a new ClusterRoomSettings instance.

The instance must be passed to the ClusterJoinOrCreateRequest class constructor.

On the server-side, a Game Room is represented on the Game Node by the SFSGame Java class, which extends the Room class providing advanced features such as player matching, game invitations, public and private games, quick game joining, etc. On the client side Game Rooms are regular Rooms with their isGame property set to true.

Parameter

Name Type Optional Description

name

 

 

The name of the Game Room to be created.

See also
ClusterJoinOrCreateRequest
SFSRoom

Properties

invitationExpiryTime  number

In private games, defines the number of seconds that the users invited to join the game have to reply to the invitation.

The suggested range is 30 to 60 seconds.

Default value
30

invitationParams  SFSObject

In private games, defines an optional SFSObject containing additional custom parameters to be sent together with the invitation.

Possible custom parameters to be transferred to the invitees are a message for the recipient, the game details (title, type...), the inviter details, etc.

Default value
null

invitedPlayers  (Array of SFSUser or Array of SFSBuddy)

In private games, defines a list of SFSUser or SFSBuddy objects representing players to be invited to join the game.

Default value
null

isPublic  boolean

Indicates whether the game is public or private.

A public game can be joined by any player whose User Variables match the playerMatchExpression assigned to the Game Room. A private game can be joined by users invited by the game creator by means of invitedPlayers list.

Default value
true

minPlayersToStartGame  number

Defines the minimum number of players required to start the game.

If the notifyGameStarted property is set to true, when this number is reached, the game start is notified.

Default value
2

notifyGameStarted  boolean

Indicates if a game state change must be notified when the minimum number of players is reached.

If this setting is true, the game state (started or stopped) is handled by means of the reserved Room Variable represented by the ReservedRoomVariables.RV_GAME_STARTED constant. Listening to the roomVariablesUpdate event for this variable allows clients to be notified when the game can start due to minimum number of players being reached.

Default value
false
See also
ReservedRoomVariables.RV_GAME_STARTED
SFSEvent.ROOM_VARIABLES_UPDATE
SFSRoomVariable