GammaSDK
GammaSDK lets your HTML5 game talk to Gamma Games — the player's coins, cloud-synced save data, public profile, and the canonical Gamma Coin value.
There are two ways to integrate, and this site covers both:
- The package —
@swiftware/gamma-sdk, a tiny, typed, promise-first wrapper. Recommended for almost everyone. It handles ready-waiting, the offline fallback, and ships a dev mock so you can build and test outside the app. - Manual — call the raw
window.GammaSDKbridge directly, no build step. See Manual integration.
What you can do
| Capability | Package | Notes |
|---|---|---|
| Read / spend / earn coins | getCoins, spendCoins, earnCoins | Server-authoritative, atomic |
| Cloud save | gamma.storage | Account-bound, localStorage fallback |
| Player profile | getPlayer | Public fields only |
| Canonical coin value | getCoinValue, coinsToUsd, formatCoins | Shared by every game |
The golden rule
Coins only work inside the Gamma Games app. That's where the real, server-authoritative bridge is injected. Outside the app the SDK is inert by default — guard coin features on
gamma.isInAppand keep an offline path. See App-only & offline.
Next steps
- Install the package or drop-in script.
- Quickstart — integrate in 3 steps.
- Integrate with AI — copy one prompt into your AI tool.
Ask:View .md