SmartFoxServer 2X C++ API
|
This class provides all the settings required to create an SFSGame(*). More...
#include <SFSGameSettings.h>
Public Member Functions | |
bool | IsPublic () |
Check if the Game is public or private More... | |
void | IsPublic (bool value) |
Check if the Game is public or private More... | |
long int | MinPlayersToStartGame () |
The minimum number of players to start the Game More... | |
void | MinPlayersToStartGame (long int value) |
The minimum number of players to start the Game More... | |
boost::shared_ptr< list< boost::shared_ptr< User > > > | InvitedPlayersUser () |
Private games only: the list of invited Players (an Array of Users) More... | |
void | InvitedPlayersUser (boost::shared_ptr< list< boost::shared_ptr< User > > > value) |
Private games only: the list of invited Players (an Array of Users) More... | |
boost::shared_ptr< list< boost::shared_ptr< Buddy > > > | InvitedPlayersBuddy () |
Private games only: the list of invited Players (an Array of Users) More... | |
void | InvitedPlayersBuddy (boost::shared_ptr< list< boost::shared_ptr< Buddy > > > value) |
Private games only: the list of invited Players (an Array of Users) More... | |
boost::shared_ptr< list< string > > | SearchableRooms () |
Private games only: An list of room groups (Array of String) where to search for more players More... | |
void | SearchableRooms (boost::shared_ptr< list< string > > value) |
Private games only: An list of room groups (Array of String) where to search for more players More... | |
long int | InvitationExpiryTime () |
The amount of time (in seconds) available for the User to reply to the invitation. More... | |
void | InvitationExpiryTime (long int value) |
The amount of time (in seconds) available for the User to reply to the invitation. More... | |
bool | LeaveLastJoinedRoom () |
Determines if the Players will leave their previous Room when joining the Game More... | |
void | LeaveLastJoinedRoom (bool value) |
Determines if the Players will leave their previous Room when joining the Game More... | |
bool | NotifyGameStarted () |
Uses a "reserved" global Room Variable to notify the started/stopped status of the game. More... | |
void | NotifyGameStarted (bool value) |
Uses a "reserved" global Room Variable to notify the started/stopped status of the game. More... | |
boost::shared_ptr< MatchExpression > | PlayerMatchExpression () |
A MatchExpression for filtering Users joining the Game. More... | |
void | PlayerMatchExpression (boost::shared_ptr< MatchExpression > value) |
A MatchExpression for filtering Users joining the Game. More... | |
boost::shared_ptr< MatchExpression > | SpectatorMatchExpression () |
A MatchExpression for filtering Spectators joining the Game. More... | |
void | SpectatorMatchExpression (boost::shared_ptr< MatchExpression > value) |
A MatchExpression for filtering Spectators joining the Game. More... | |
boost::shared_ptr< ISFSObject > | InvitationParams () |
An optional custom object with parameters (e.g. a message, game details etc...) More... | |
void | InvitationParams (boost::shared_ptr< ISFSObject > value) |
An optional custom object with parameters (e.g. a message, game details etc...) More... | |
Public Member Functions inherited from Sfs2X::Requests::RoomSettings | |
RoomSettings (string name) | |
Constructor More... | |
boost::shared_ptr< string > | Name () |
The name of the new Room More... | |
void | Name (string value) |
The name of the new Room More... | |
boost::shared_ptr< string > | Password () |
The password of the Room. If empty the Room will not be password protected More... | |
void | Password (string value) |
The password of the Room. If empty the Room will not be password protected More... | |
bool | IsGame () |
Indicates if this is a Game Room More... | |
void | IsGame (bool value) |
Indicates if this is a Game Room More... | |
short int | MaxUsers () |
The maximum number of users/players allowed in the Room More... | |
void | MaxUsers (short int value) |
The maximum number of users/players allowed in the Room More... | |
short int | MaxVariables () |
The maximum number of Room Variables allowed for this Room More... | |
void | MaxVariables (short int value) |
The maximum number of Room Variables allowed for this Room More... | |
short int | MaxSpectators () |
The maximum number of spectators allowed for this Room (only for Game Rooms) More... | |
void | MaxSpectators (short int value) |
The maximum number of spectators allowed for this Room (only for Game Rooms) More... | |
boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > > | Variables () |
A list of Room Variables that should be attached to the newly created Room More... | |
void | Variables (boost::shared_ptr< vector< boost::shared_ptr< RoomVariable > > > value) |
A list of Room Variables that should be attached to the newly created Room More... | |
boost::shared_ptr< RoomPermissions > | Permissions () |
The Room Permission settings of the new Room More... | |
void | Permissions (boost::shared_ptr< RoomPermissions > value) |
The Room Permission settings of the new Room More... | |
boost::shared_ptr< RoomEvents > | Events () |
The Room Event settings of the new Room More... | |
void | Events (boost::shared_ptr< RoomEvents > value) |
The Room Event settings of the new Room More... | |
boost::shared_ptr< RoomExtension > | Extension () |
The Extension settings for the new Room More... | |
void | Extension (boost::shared_ptr< RoomExtension > value) |
The Extension settings for the new Room More... | |
boost::shared_ptr< string > | GroupId () |
The id of the Room Group in which the new Room should be created More... | |
void | GroupId (string value) |
The id of the Room Group in which the new Room should be created More... | |
bool | AllowOwnerOnlyInvitation () |
Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner. More... | |
void | AllowOwnerOnlyInvitation (bool value) |
Specifies if the Room allows "Join Room" invitations to be sent by any user or just by its owner. More... | |
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 SFSGame class exists only on the server side as extension of the SFSRoom class. On the client side it's seen as a regular Room.
This is a quick overview of the settings that you can use to setup an SFSGame
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.
long int Sfs2X::Requests::Game::SFSGameSettings::InvitationExpiryTime | ( | ) |
The amount of time (in seconds) available for the User to reply to the invitation.
Suggested range 10-40 seconds
void Sfs2X::Requests::Game::SFSGameSettings::InvitationExpiryTime | ( | long int | value | ) |
The amount of time (in seconds) available for the User to reply to the invitation.
Suggested range 10-40 seconds
boost::shared_ptr< ISFSObject > Sfs2X::Requests::Game::SFSGameSettings::InvitationParams | ( | ) |
An optional custom object with parameters (e.g. a message, game details etc...)
void Sfs2X::Requests::Game::SFSGameSettings::InvitationParams | ( | boost::shared_ptr< ISFSObject > | value | ) |
An optional custom object with parameters (e.g. a message, game details etc...)
boost::shared_ptr< list< boost::shared_ptr< Buddy > > > Sfs2X::Requests::Game::SFSGameSettings::InvitedPlayersBuddy | ( | ) |
Private games only: the list of invited Players (an Array of Users)
void Sfs2X::Requests::Game::SFSGameSettings::InvitedPlayersBuddy | ( | boost::shared_ptr< list< boost::shared_ptr< Buddy > > > | value | ) |
Private games only: the list of invited Players (an Array of Users)
boost::shared_ptr< list< boost::shared_ptr< User > > > Sfs2X::Requests::Game::SFSGameSettings::InvitedPlayersUser | ( | ) |
Private games only: the list of invited Players (an Array of Users)
void Sfs2X::Requests::Game::SFSGameSettings::InvitedPlayersUser | ( | boost::shared_ptr< list< boost::shared_ptr< User > > > | value | ) |
Private games only: the list of invited Players (an Array of Users)
bool Sfs2X::Requests::Game::SFSGameSettings::IsPublic | ( | ) |
Check if the Game is public or private
void Sfs2X::Requests::Game::SFSGameSettings::IsPublic | ( | bool | value | ) |
Check if the Game is public or private
bool Sfs2X::Requests::Game::SFSGameSettings::LeaveLastJoinedRoom | ( | ) |
Determines if the Players will leave their previous Room when joining the Game
void Sfs2X::Requests::Game::SFSGameSettings::LeaveLastJoinedRoom | ( | bool | value | ) |
Determines if the Players will leave their previous Room when joining the Game
long int Sfs2X::Requests::Game::SFSGameSettings::MinPlayersToStartGame | ( | ) |
The minimum number of players to start the Game
void Sfs2X::Requests::Game::SFSGameSettings::MinPlayersToStartGame | ( | long int | value | ) |
The minimum number of players to start the Game
bool Sfs2X::Requests::Game::SFSGameSettings::NotifyGameStarted | ( | ) |
Uses a "reserved" global Room Variable to notify the started/stopped status of the game.
This depends on the number of Users inside the Room.
void Sfs2X::Requests::Game::SFSGameSettings::NotifyGameStarted | ( | bool | value | ) |
Uses a "reserved" global Room Variable to notify the started/stopped status of the game.
This depends on the number of Users inside the Room.
boost::shared_ptr< MatchExpression > Sfs2X::Requests::Game::SFSGameSettings::PlayerMatchExpression | ( | ) |
A MatchExpression for filtering Users joining the Game.
Recommended for public Games only
void Sfs2X::Requests::Game::SFSGameSettings::PlayerMatchExpression | ( | boost::shared_ptr< MatchExpression > | value | ) |
A MatchExpression for filtering Users joining the Game.
Recommended for public Games only
boost::shared_ptr< list< string > > Sfs2X::Requests::Game::SFSGameSettings::SearchableRooms | ( | ) |
Private games only: An list of room groups (Array of String) where to search for more players
void Sfs2X::Requests::Game::SFSGameSettings::SearchableRooms | ( | boost::shared_ptr< list< string > > | value | ) |
Private games only: An list of room groups (Array of String) where to search for more players
boost::shared_ptr< MatchExpression > Sfs2X::Requests::Game::SFSGameSettings::SpectatorMatchExpression | ( | ) |
A MatchExpression for filtering Spectators joining the Game.
void Sfs2X::Requests::Game::SFSGameSettings::SpectatorMatchExpression | ( | boost::shared_ptr< MatchExpression > | value | ) |
A MatchExpression for filtering Spectators joining the Game.