SFSGameSettings Class Reference
| Inherits from | RoomSettings : NSObject |
| Declared in | SFSGameSettings.h SFSGameSettings.m |
Overview
This class provides all the settings required to create an SFSGame(*).
The SFSGame(*) object extends the Room object providing new advanced features such as Player matching, Game invitations, public and private Games, quick game joining etc.
(*) = the
This is a quick overview of the settings that you can use to setup an
- isGamePublic: a public game can be joined by any Player whose variables match the SFSGame Player Match Expression. Private games are based on invitations sent by the Game creator.
- minPlayersToStartGame: the minimum number of players to start the game.
- invitedPlayers: (private games only) a list of players invited in the Game
- searchableRooms: (private games only) a list of Rooms where the Game API can search for more players to invite. The API will look for more players if the number of people invited is smaller than the minPlayersToStartGame. This way you can add your friends to the game and let the system find more players to start it.
- leaveLastJoinedRoom: auto-remove players from their previous Room after successful join
- playerMatchExpression: an expression to match players willing to play the game, by default no expression is used
- spectatorMatchExpression: an expression to match spectators willing to play the game, by default no expression is used
- invitationExpiryTime: the amount of time allowed for invited players to accept / refuse
- invitationParameters: optional custom invitation parameters.These could provide details about the inviter, the game, an invitation message etc…
- notifyGameStartedViaRoomVariable: automatically update a reserved Room Variable to signal that the game is started/stopped. The Room variable uses the global setting to be broadcast outside of the Room. This can be used on the client side to show the game state in your game list.
Tasks
-
isPublicCheck if the Game is public or private
property -
minPlayersToStartGameThe minimum number of players to start the Game
property -
invitedPlayersPrivate games only: a list of invited Players (an Array of Users)
property -
searchableRoomsPrivate games only: a list of room groups (Array of String) where to search for more players
property -
playerMatchExpression(Recommended for public Games only) A MatchExpression for filtering Users joining the Game.
property -
spectatorMatchExpressionA MatchExpression for filtering Spectators joining the Game.
property -
invitationExpiryTimeThe amount of time (in seconds) available for the User to reply to the invitation. Suggested range 10-40 seconds
property -
leaveJoinedLastRoomDetermines if the Players will leave their previous Room when joining the Game
property -
notifyGameStartedUses a “reserved” global Room Variable to notify the started/stopped status of the game. This depends on the numer of Users inside the Room.
property -
invitationParamsAn optional custom object with parameters (e.g. a message, game details etc…)
property
Properties
invitationExpiryTime
The amount of time (in seconds) available for the User to reply to the invitation. Suggested range 10-40 seconds
@property (nonatomic, assign) NSInteger invitationExpiryTimeDiscussion
The amount of time (in seconds) available for the User to reply to the invitation. Suggested range 10-40 seconds
Declared In
SFSGameSettings.hinvitationParams
An optional custom object with parameters (e.g. a message, game details etc…)
@property (nonatomic, retain) id<> invitationParamsDiscussion
An optional custom object with parameters (e.g. a message, game details etc…)
Declared In
SFSGameSettings.hinvitedPlayers
Private games only: a list of invited Players (an Array of Users)
@property (nonatomic, retain) NSArray *invitedPlayersDiscussion
Private games only: a list of invited Players (an Array of Users)
Declared In
SFSGameSettings.hisPublic
Check if the Game is public or private
@property (nonatomic, assign) BOOL isPublicDiscussion
Check if the Game is public or private
Declared In
SFSGameSettings.hleaveJoinedLastRoom
Determines if the Players will leave their previous Room when joining the Game
@property (nonatomic, assign) BOOL leaveJoinedLastRoomDiscussion
Determines if the Players will leave their previous Room when joining the Game
Declared In
SFSGameSettings.hminPlayersToStartGame
The minimum number of players to start the Game
@property (nonatomic, assign) NSInteger minPlayersToStartGameDiscussion
The minimum number of players to start the Game
Declared In
SFSGameSettings.hnotifyGameStarted
Uses a “reserved” global Room Variable to notify the started/stopped status of the game. This depends on the numer of Users inside the Room.
@property (nonatomic, assign) BOOL notifyGameStartedDiscussion
Uses a “reserved” global Room Variable to notify the started/stopped status of the game. This depends on the numer of Users inside the Room.
See Also
Declared In
SFSGameSettings.hplayerMatchExpression
(Recommended for public Games only) A MatchExpression for filtering Users joining the Game.
@property (nonatomic, retain) MatchExpression *playerMatchExpressionDiscussion
(Recommended for public Games only) A MatchExpression for filtering Users joining the Game.
See Also
Declared In
SFSGameSettings.hsearchableRooms
Private games only: a list of room groups (Array of String) where to search for more players
@property (nonatomic, retain) NSArray *searchableRoomsDiscussion
Private games only: a list of room groups (Array of String) where to search for more players
Declared In
SFSGameSettings.h