Add Amazon GameLift to an O3DE game client and server
You can use O3DE, an open-source, cross-platform, real time 3D engine to create high performance interactive experiences, including games and simulations. The O3DE renderer and tools are wrapped in a modular framework that you can modify and extend with your preferred development tools.
The modular framework uses Gems that contain libraries with standard interfaces and assets. Select your own Gems to choose what functionality to add based on your requirements.
The Amazon GameLift Gem provides the following features:
- Amazon GameLift integration
-
A framework to extend the O3DE networking layer and to let the Multiplayer Gem work with the Amazon GameLift dedicated server solution. The Gem provides integrations with both the Amazon GameLift server SDK and the Amazon SDK client (to call the Amazon GameLift service itself).
- Build and package management
-
Instructions to package and optionally upload the dedicated server build and an Amazon Cloud Development Kit (Amazon CDK) (Amazon CDK) application to set up and update resources.
Amazon GameLift Gem setup
Follow the procedures in this section to set up the Amazon GameLift Gem in O3DE.
Prerequisites
-
Set up your Amazon account for Amazon GameLift. For more information, see Set up an Amazon Web Services account.
-
Set up Amazon credentials for O3DE. For more information see, Configuring Amazon Credentials
. -
Set up the Amazon CLI and Amazon CDK. For more information, Amazon Command Line Interface
and Amazon Cloud Development Kit (Amazon CDK) .
Turn on the Amazon GameLift Gem and its dependencies
-
Open the Project Manager.
-
Open the menu under your project and choose Edit Project Setting....
-
Choose Configure Gems.
-
Turn on the Amazon GameLift Gem and the following dependent Gems:
-
Amazon Core Gem
– Provide the framework to use Amazon Web Services services in O3DE. -
Multiplayer Gem
– Provides multiplayer functionality by extending the networking framework.
-
Include the Amazon GameLift Gem static library
-
Include the
Gem::AWSGameLift.Server.Static
asBUILD_DEPENDENCIES
for your project server target.ly_add_target( NAME YourProject.Server.Static STATIC ... BUILD DEPENDCIES PUBLIC ... PRIVATE ... Gem::AWSGameLift.Server.Static )
-
Set
AWSGameLiftService
to required for your project server system component.void YourProjectServerSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { ... required.push_back(AZ_CRC_CE("AWSGameLiftServerService")); ... }
-
(Optional) To make Amazon GameLift service requests in C++, include
Gem::AWSGameLift.Client.Static
in theBUILD_DEPENDENCIES
for your client target.ly_add_target( NAME YourProject.Client.Static STATIC ... BUILD_DEPENDENCIES PUBLIC ... PRIVATE ... Gem::AWSCore.Static Gem::AWSGameLift.Client.Static }
Integrate your game and dedicated server
Manage game sessions within your game and dedicated game server with the Session Management Integration