Amazon GameSparks FAQ

Amazon GameSparks is a managed service that provides game developers backend features for building, running, and scaling games on AWS. At GDC 2022, AWS announced the launch of Amazon GameSparks in preview with the SDK for the Unity game engine now available to download from the Amazon GameSparks website. The Amazon GameSparks team has worked closely with the game developer community to iterate and refine the service features. To learn more about Amazon GameSparks, click here.

1) What platforms and features will Amazon GameSparks support in preview?

For preview, Amazon GameSparks will support mobile (iOS and Android) and PC gaming platforms. It will also include features that will be familiar to existing GameSparks developers. Those features are Cloud Code, player storage, guest authentication, player messaging, test harness, user management, snapshot management and a Unity engine integration. Additional features and engine integrations will be added at a later date. Amazon GameSparks has new features including integrations with Amazons DynamoDB and AWS Lambda services. More details about these integrations are shared below.

2) Can I deploy a live game during the preview of Amazon GameSparks?

No, live game deployments are not enabled during preview. Amazon GameSparks will only support game development use cases and not production workloads/live games during preview. Developers can develop game backends and a maximum of 10 concurrent users will be supported per game during preview. The features to promote games to production will be provided when Amazon GameSparks is Generally Available. You can find more information about deploying configuration changes during the preview here.

3) What region will the preview of Amazon GameSparks be available in?

The preview for Amazon GameSparks will be available in the US East (Northern Virginia) Region.

4) How are Events in Amazon GameSparks compared to GameSparks?

In GameSparks, Events and their attributes are configured independently from Cloud Code. In Amazon GameSparks, Events are classified as a message type and can be created within the Cloud Code editor. All messages have fields which have 3 properties. A name, the shape of the field, and whether it's required or not.

There are 3 types of messages in Amazon GameSparks.

5) How is Cloud Code in Amazon GameSparks compared to GameSparks?

The Cloud Code interface on Amazon GameSparks provides an improved user experience in comparison to GameSparks. In GameSparks, Events, Cloud Code and Messages were all accessed and configured independently of each other. In Amazon GameSparks, creating notifications, requests, events, defining shapes (attributes) and writing Cloud Code handlers can all be done within the Cloud Code editor itself. This streamlines developers workflow by reducing the need to navigate between pages to make small changes. GameSparks and Amazon GameSparks both support JavaScript to implement game logic in Cloud Code. Amazon GameSparks supports JavaScript ES5.1.

6) How is Test Harness in Amazon GameSparks compared to GameSparks?

The Test Harness in Amazon GameSparks will feel familiar to developers who have used it on GameSparks. The Test Harness can be used to mimic a connected device to invoke requests/events and examine request/response data, sent events and notifications received in the Log Inspector. This enables developers to iterate and test updates to game configurations quickly within the console without having to integrate changes all the way from backend to client. In Amazon GameSparks, you will need to deploy a snapshot in the Dev environment before you can test code changes in Test Harness.

7) How is the Unity Integration in Amazon GameSparks compared to GameSparks?

The process for integrating with Unity is similar for both services.

8) How is user management handled in Amazon GameSparks compared to GameSparks?

In GameSparks you could add a collaborator to your game with an email address and configure access rights on a per game level. Amazon GameSparks is integrated with the IAM (Identity and Access Management) service. This services provides fine-grained access control across all AWS services. In GameSparks a group (role) would have to be created and configured in each individual game. On Amazon GameSparks IAM gives you the power to configure roles across multiple game instances and AWS resources. More information on the IAM integration can be found here.

9) How is logging handled in Amazon GameSparks compared to GameSparks?

API Comparison

GameSparks
// debug log
Spark.getLog().debug("my debug log");

// error log
Spark.getLog().error("my errorlog");

// info log 
Spark.getLog().info("my info log");

// warning log
Spark.getLog().warn("my warn log");

Amazon GameSparks
// debug log
GameSparks().Logging().Debug("my debug log");

// error log
GameSparks().Logging().Error("my errorlog");

// info log 
GameSparks().Logging().Info("my info log");

// warning log
GameSparks().Logging().Warn("my warn log");

10) How is the messaging system in Amazon GameSparks compared to GameSparks?

The SendNotification Cloud Code API in Amazon GameSparks is similar to the GameSparks SparkMessage Cloud Code API. The SendNotification API allows a notification to be sent from Cloud Code to the current player or another player. As Notifications are a message type on Amazon GameSparks they are configured in the message window within Cloud Code.

API Comparison

GameSparks
// send a notification to a player
Spark.message("myMessage").setPlayerIds(playerIds).setMessageData({"myMessage":"myData"}).send();

Amazon GameSparks
// send notification to the current player executing the handler
GameSparks().CurrentPlayer().SendNotification("Custom.Game.myMessage", {"Message":"Hello World!"});

// send notification to another player
GameSparks().Player(playerId).SendNotification("Custom.Game.myMessage", {"Message":"Hello World!"});

11) How is the snapshot management in Amazon GameSparks compared to GameSparks?

12) How is the player data managed in Amazon GameSparks compared to GameSparks? Amazon GameSparks player storage APIs are quite similar to those found on GameSparks. Both allow you to set, get and remove data that is stored on the system player object. Player data can also be stored in a DynamoDB table using the DynamoDB integration.

API Comparison

GameSparks
// set data in player storage
Spark.getPlayer().setScriptData("myKey", "myValue");

// get data from player storage
Spark.getPlayer().getScriptData("myKey");

// remove data from player storage
Spark.getPlayer().removeScriptData("myKey");

Amazon GameSparks
// set data in player storage
GameSparks().CurrentPlayer().SetData([{"myKey":"myValue"}]);

// get data from player storage
GameSparks().CurrentPlayer().GetData(["myKey"]);

// remove data from player storage
GameSparks().CurrentPlayer().RemoveData(["myKey"]);

13) How do I get started with Amazon GameSparks?

Step 1: Game setup

Step 2: Configure game

Step 3: Deploy and test

Step 4: Game-client Integration

14) What is the pricing model on Amazon GameSparks ?

Currently, there are no charges for using Amazon GameSparks while in preview, though you will be charged for other AWS services you use during that time. After preview, you will be charged for your usage of Amazon GameSparks. Usage is measured in (1) Cloud Code API calls between Amazon GameSparks backend and feature micro-services, (2) Client API calls between game clients and Amazon GameSparks backend, and (3) storage. For more information on pricing, please visit here.