Developer Guide (Version 1.12)

Game Clients

The Cloud Gem Framework can generate game clients for your service API.

The game client can call some API operations on behalf of the player. Other operations are callable only by other roles for use in the Cloud Gem Portal or other tools. By default, the client uses the AWS credentials by assuming the Player role through an Amazon Cognito identity pool. This process, described in detail in Player Identity, is illustrated in the following diagram.

            Client assumes the Player role

Generating a Game Client

Generating a game client is straightforward.

To generate a game client

Type the following command:

lmbr_aws cloud-gem-framework generate-service-api-code --resource-group <group>

The generate-service-api-code command reads the swagger.json file that contains definitions for the resource group's service API. The command creates a C++ header file that implements a Lumberyard component. The header file is named <group>ClientComponent.h.

The directory location of the header file depends on whether <group> refers to a cloud gem or a project-defined resource group.

Generated Component Header File Locations

Parameter Type Header File Location
cloud gem Gems\<gem>\Code\AWS\ServiceApi
resource group Code\<game>\AWS\<group>\ServiceAPI

Component Header File Accessibility

For a gem, the default location of the generated header file does not make it accessible outside of that gem. Typically, a cloud gem's service API is private to the gem, and the gem exposes its functionality through its own custom component. If you want to provide direct access to the cloud gem's API from other gems or game code, you can move the generated header file into the gem's Code\Include directory.


On this page: