GameSparks Backend Integration for Mobile Games
GameSparks—cloud game backend from Amazon (AWS). In 2022, Amazon moved GameSparks to limited support and announced service sunset—creating new games via AWS GameSparks console closed January 2024. If project already uses GameSparks, options are: support and extend existing integration, or migrate to current backend.
Existing Integration: What to Support
GameSparks on Unity used GS.GameSparksAvailable callback for init and GameSparksAuthentication for login:
GS.GameSparksAvailable = (available) => {
if (available) {
new DeviceAuthenticationRequest()
.SetDisplayName(playerName)
.Send(response => {
if (!response.HasErrors) {
// Successful auth
var playerId = response.UserId;
}
});
}
};
Cloud Code (JavaScript on GameSparks) handled business logic: currency grants, move validation, leaderboard. Cloud Code calls via LogEventRequest.
Supporting existing project includes: updating SDK to last compatible version, fixing deprecated APIs, adding new cloud-script modules within existing architecture.
GameSparks Migration
For new projects and long-term development, migration to current backend is mandatory. Options:
| Solution | Type | Notes |
|---|---|---|
| Nakama | Self-hosted / Cloud | Open-source, TypeScript cloud code |
| PlayFab | Cloud (Microsoft) | Free tier, Azure integration |
| Unity Gaming Services | Cloud | Native Unity integration |
| Go/Node.js App | Custom | Full control |
Data audit—first migration step. GameSparks stored data in MongoDB-like structure via Runtime Collections. Export via GameSparks REST API or Bulk Jobs. Data schema redescribed for target database.
Cloud Code → server logic. GameSparks JavaScript rewritten to TypeScript (Nakama) or Azure Functions/AWS Lambda (PlayFab). Request semantics differ, but business logic ports block-by-block.
Client SDK. GameSparks SDK removed, add target platform SDK. IGameBackend abstraction layer with Authenticate, SaveData, GetLeaderboard methods allows swapping implementations without changing game logic.
Supporting iOS and Android Projects
Native GameSparks SDK for iOS (Objective-C/Swift) and Android (Java) officially unsupported. Native apps used REST API or WebSocket directly. Existing calls:
POST /rs/{credential}/{secret}/gsi
{
"@class": ".AuthenticationRequest",
"deviceId": "...",
"deviceOS": "IOS"
}
Migrating to PlayFab, equivalent is LoginWithIOSDeviceID / LoginWithAndroidDeviceID. Request structures differ but functionality fully covered.
Timeline
Support and extending existing GameSparks project: estimated by task volume. Migration audit: 2-3 days. Full GameSparks → Nakama or PlayFab migration: 3-8 weeks depending on Cloud Code volume and data. Cost calculated individually.







