Testing
Test outside the app with the dev mock
Enable the dev mock and run your game in a plain browser. Then use the included interactive harness to exercise every method:
It shows an in-app vs dev mock badge and logs each SDK response, with
buttons for getCoins, spendCoins, earnCoins, getCoinValue, getPlayer,
and storage save/load.
Pre-submission checklist
Before submitting your game to Gamma Games, verify:
- Game loads and plays without the SDK (outside the app)
- After
gamma.ready(), coin features are gated ongamma.isInApp -
getCoinsshows the correct balance in-app -
spendCoinsdeducts and grants the reward only onok: true -
spendCoinsover the balance shows an error, balance unchanged - Invalid
reason(uppercase/spaces) is rejected -
getCoinValuereturnsusdPerCoin+ display metadata -
gamma.storage.savepersists across app restarts (in-app) and reloads (offline) -
gamma.storage.loadreturnsnullfor a fresh player - Saves stay under 100 KB and carry a
schemaVersion - The game shows friendly messages, never raw error codes
- The dev mock is disabled in the production build
Ask:View .md