Class CreateSFSGameRequest
- All Implemented Interfaces:
sfs3.client.requests.IClientRequest
A game is created through the instantiation of a SFSGame on the server-side, a specialized Room type that provides advanced features during the creation phase of a game. Specific game-configuration settings are passed by means of the SFSGameSettings class.
If the creation is successful, a roomAdd event is dispatched to all the users who subscribed the Group to which the Room is associated, including the game creator. Otherwise, a roomCreationError event is returned to the creator's client.
Also, if the settings passed in the SFSGameSettings object cause invitations to join the game to be sent, an invitation event is dispatched to all the recipient clients.
Check the SmartFoxServer 3 documentation for a more in-depth overview of the GAME API.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class sfs3.client.requests.BaseRequest
AddBuddy, AdminMessage, AutoJoin, BanUser, BanUsersFromRoom, BlockBuddy, CallExtension, ChangeRoomCapacity, ChangeRoomName, ChangeRoomPassword, ClusterInviteUsers, ClusterJoinOrCreate, CreateRoom, CreateSFSGame, FindRooms, FindUsers, GameServerConnectionRequired, GenericMessage, GetRoomList, GoOnline, Handshake, InitBuddyList, InvitationReply, InviteUser, JoinRoom, JoinRoomInvite, KEY_ERROR_CODE, KEY_ERROR_PARAMS, KickUser, LeaveRoom, Login, Logout, ManualDisconnection, ModeratorMessage, ObjectMessage, PingPong, PlayerToSpectator, PrivateMessage, PublicMessage, QuickJoinGame, QuickJoinOrCreateRoom, RemoveBuddy, SetBuddyVariables, SetRoomVariables, SetUserPosition, SetUserVariables, sfso, SpectatorToPlayer, SubscribeRoomGroup, targetController, UdpInit, UnsubscribeRoomGroup -
Constructor Summary
ConstructorsConstructorDescriptionCreateSFSGameRequest(SFSGameSettings settings) Creates a new CreateSFSGameRequest instance. -
Method Summary
Methods inherited from class sfs3.client.requests.BaseRequest
getId, getRequest, getTargetController, getTransportType, setId, setTargetController, setTransportType
-
Field Details
-
KEY_IS_PUBLIC
- See Also:
- Internal
-
KEY_MIN_PLAYERS
- See Also:
- Internal
-
KEY_INVITED_PLAYERS
- See Also:
- Internal
-
KEY_SEARCHABLE_ROOMS
- See Also:
- Internal
-
KEY_PLAYER_MATCH_EXP
- See Also:
- Internal
-
KEY_SPECTATOR_MATCH_EXP
- See Also:
- Internal
-
KEY_INVITATION_EXPIRY
- See Also:
- Internal
-
KEY_LEAVE_ROOM
- See Also:
- Internal
-
KEY_NOTIFY_GAME_STARTED
- See Also:
- Internal
-
KEY_INVITATION_PARAMS
- See Also:
- Internal
-
-
Constructor Details
-
CreateSFSGameRequest
Creates a new CreateSFSGameRequest instance. The instance must be passed to the SmartFox.send() method for the request to be performed.- Parameters:
settings- An object containing the SFSGame configuration settings.- See Also:
-
-
Method Details
-
validate
- Throws:
SFSValidationException- Internal
-
execute
- Internal
-