Skip to main content

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.GammaSDK bridge directly, no build step. See Manual integration.

What you can do

CapabilityPackageNotes
Read / spend / earn coinsgetCoins, spendCoins, earnCoinsServer-authoritative, atomic
Cloud savegamma.storageAccount-bound, localStorage fallback
Player profilegetPlayerPublic fields only
Canonical coin valuegetCoinValue, coinsToUsd, formatCoinsShared 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.isInApp and keep an offline path. See App-only & offline.

Next steps

Ask:View .md