Open 3D Engine AWSGameLift Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AWSGameLift::AWSGameLiftServerManager Class Reference

Manage the server process for hosting game sessions via GameLiftServerSDK. More...

#include <AWSGameLiftServerManager.h>

Inherits AWSGameLiftServerRequestBus::Handler, and Multiplayer::ISessionHandlingProviderRequests.

Public Member Functions

void ActivateManager ()
 
void DeactivateManager ()
 
void InitializeGameLiftServerSDK ()
 Initialize GameLift API client by calling InitSDK().
 
bool NotifyGameLiftProcessReady () override
 
bool StartMatchBackfill (const AZStd::string &ticketId, const AZStd::vector< AWSGameLiftPlayer > &players) override
 
bool StopMatchBackfill (const AZStd::string &ticketId) override
 
void HandleDestroySession () override
 
bool ValidatePlayerJoinSession (const Multiplayer::PlayerConnectionConfig &playerConnectionConfig) override
 
void HandlePlayerLeaveSession (const Multiplayer::PlayerConnectionConfig &playerConnectionConfig) override
 
AZ::IO::Path GetExternalSessionCertificate () override
 

Static Public Attributes

static constexpr const char AWSGameLiftServerManagerName [] = "AWSGameLiftServerManager"
 
static constexpr const char AWSGameLiftServerSDKNotInitErrorMessage []
 
static constexpr const char AWSGameLiftServerSDKAlreadyInitErrorMessage []
 
static constexpr const char AWSGameLiftServerTempPortErrorMessage []
 
static constexpr const char AWSGameLiftServerGameInitErrorMessage []
 
static constexpr const char AWSGameLiftServerGameSessionDestroyErrorMessage []
 
static constexpr const char AWSGameLiftServerPlayerConnectionRegisteredErrorMessage []
 
static constexpr const char AWSGameLiftServerPlayerConnectionMissingErrorMessage []
 
static constexpr const char AWSGameLiftServerInstanceCertificateErrorMessage []
 
static constexpr const char AWSGameLiftServerInstancePrivateKeyErrorMessage []
 
static constexpr const char AWSGameLiftServerInitSDKErrorMessage []
 
static constexpr const char AWSGameLiftServerProcessReadyErrorMessage []
 
static constexpr const char AWSGameLiftServerActivateGameSessionErrorMessage []
 
static constexpr const char AWSGameLiftServerProcessEndingErrorMessage []
 
static constexpr const char AWSGameLiftServerAcceptPlayerSessionErrorMessage []
 
static constexpr const char AWSGameLiftServerInvalidConnectionConfigErrorMessage []
 
static constexpr const char AWSGameLiftServerRemovePlayerSessionErrorMessage []
 
static constexpr const char AWSGameLiftMatchmakingDataInvalidErrorMessage []
 
static constexpr const char AWSGameLiftMatchmakingDataMissingErrorMessage []
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeInvalidErrorMessage []
 
static constexpr const char AWSGameLiftDescribePlayerSessionsErrorMessage []
 
static constexpr const char AWSGameLiftStartMatchBackfillErrorMessage []
 
static constexpr const char AWSGameLiftStopMatchBackfillErrorMessage []
 
static constexpr const char AWSGameLiftMatchmakingConfigurationKeyName [] = "matchmakingConfigurationArn"
 
static constexpr const char AWSGameLiftMatchmakingTeamsKeyName [] = "teams"
 
static constexpr const char AWSGameLiftMatchmakingTeamNameKeyName [] = "name"
 
static constexpr const char AWSGameLiftMatchmakingPlayersKeyName [] = "players"
 
static constexpr const char AWSGameLiftMatchmakingPlayerIdKeyName [] = "playerId"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributesKeyName [] = "attributes"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeTypeKeyName [] = "attributeType"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeValueKeyName [] = "valueAttribute"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSTypeName [] = "S"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSServerTypeName [] = "STRING"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeNTypeName [] = "N"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeNServerTypeName [] = "DOUBLE"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSLTypeName [] = "SL"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSLServerTypeName [] = "STRING_LIST"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSDMTypeName [] = "SDM"
 
static constexpr const char AWSGameLiftMatchmakingPlayerAttributeSDMServerTypeName [] = "STRING_DOUBLE_MAP"
 
static constexpr const uint16_t AWSGameLiftDescribePlayerSessionsPageSize = 30
 

Protected Member Functions

void SetGameLiftServerSDKWrapper (AZStd::unique_ptr< GameLiftServerSDKWrapper > gameLiftServerSDKWrapper)
 
bool AddConnectedPlayer (const Multiplayer::PlayerConnectionConfig &playerConnectionConfig)
 Add connected player session id.
 
AZStd::vector< AWSGameLiftPlayerGetActiveServerMatchBackfillPlayers ()
 Get active server player data from lazy loaded game session for server match backfill.
 
void UpdateGameSessionData (const Aws::GameLift::Server::Model::GameSession &gameSession)
 Update local game session data to latest one.
 

Detailed Description

Manage the server process for hosting game sessions via GameLiftServerSDK.

Member Data Documentation

◆ AWSGameLiftDescribePlayerSessionsErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftDescribePlayerSessionsErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to describe player sessions. ErrorMessage: %s"

◆ AWSGameLiftMatchmakingDataInvalidErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftMatchmakingDataInvalidErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to parse GameLift matchmaking data. ErrorMessage: %s"

◆ AWSGameLiftMatchmakingDataMissingErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftMatchmakingDataMissingErrorMessage[]
staticconstexpr
Initial value:
=
"GameLift matchmaking data is missing or invalid to parse."

◆ AWSGameLiftMatchmakingPlayerAttributeInvalidErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftMatchmakingPlayerAttributeInvalidErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to build player %s attributes. ErrorMessage: %s"

◆ AWSGameLiftServerAcceptPlayerSessionErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerAcceptPlayerSessionErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to validate player session connection with id %s. ErrorMessage: %s"

◆ AWSGameLiftServerActivateGameSessionErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerActivateGameSessionErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to activate GameLift game session. ErrorMessage: %s"

◆ AWSGameLiftServerGameInitErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerGameInitErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to process game dependent initialization during OnStartGameSession."

◆ AWSGameLiftServerGameSessionDestroyErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerGameSessionDestroyErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to destroy game session during OnProcessTerminate."

◆ AWSGameLiftServerInitSDKErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerInitSDKErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to initialize Amazon GameLift Server SDK. ErrorMessage: %s"

◆ AWSGameLiftServerInstanceCertificateErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerInstanceCertificateErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to locate Amazon GameLift TLS certificate file."

◆ AWSGameLiftServerInstancePrivateKeyErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerInstancePrivateKeyErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to locate Amazon GameLift TLS private key file."

◆ AWSGameLiftServerInvalidConnectionConfigErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerInvalidConnectionConfigErrorMessage[]
staticconstexpr
Initial value:
=
"Invalid player connection config, player connection id: %d, player session id: %s"

◆ AWSGameLiftServerPlayerConnectionMissingErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerPlayerConnectionMissingErrorMessage[]
staticconstexpr
Initial value:
=
"Player connection id %d does not exist."

◆ AWSGameLiftServerPlayerConnectionRegisteredErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerPlayerConnectionRegisteredErrorMessage[]
staticconstexpr
Initial value:
=
"Player connection id %d is already registered to player session id %s. Remove connected player first."

◆ AWSGameLiftServerProcessEndingErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerProcessEndingErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to notify GameLift server process ending. ErrorMessage: %s"

◆ AWSGameLiftServerProcessReadyErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerProcessReadyErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to notify GameLift server process ready. ErrorMessage: %s"

◆ AWSGameLiftServerRemovePlayerSessionErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerRemovePlayerSessionErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to notify GameLift that the player with the player session id %s has disconnected from the server process. ErrorMessage: %s"

◆ AWSGameLiftServerSDKAlreadyInitErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerSDKAlreadyInitErrorMessage[]
staticconstexpr
Initial value:
=
"Amazon GameLift Server SDK has already been initialized."

◆ AWSGameLiftServerSDKNotInitErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerSDKNotInitErrorMessage[]
staticconstexpr
Initial value:
=
"Amazon GameLift Server SDK is not initialized yet."

◆ AWSGameLiftServerTempPortErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftServerTempPortErrorMessage[]
staticconstexpr
Initial value:
=
"No server port specified, server will be listening on ephemeral port."

◆ AWSGameLiftStartMatchBackfillErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftStartMatchBackfillErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to start match backfill. ErrorMessage: %s"

◆ AWSGameLiftStopMatchBackfillErrorMessage

constexpr const char AWSGameLift::AWSGameLiftServerManager::AWSGameLiftStopMatchBackfillErrorMessage[]
staticconstexpr
Initial value:
=
"Failed to stop match backfill. ErrorMessage: %s"

The documentation for this class was generated from the following file: