Quickstart
A Gamemoor game is a folder of static files that runs in an iframe in the player's browser. Nothing of yours runs on our side.
- Build it static. HTML, JavaScript and assets in one folder, with
index.htmlat its root and every internal reference relative. - Add the SDK. One script tag, before your game code. It is optional: without it the game is listed and playable, with no scores, achievements or saves. See what each gets.
- Submit a score when a run ends. One call per run, behind a flag so a game loop cannot fire it twice. See Scores.
- Zip it. Zip the contents of the folder, not the folder, so
index.htmlsits at the archive root. The limits are in Publishing. - Submit the game. Use Submit a game in the portal. We email you when it is approved or rejected.
<!-- index.html, at the root of the folder you zip -->
<script src="/_gm/sdk.js"></script>
<script type="module" src="js/main.js"></script>
<script>
// Call this once, when a run ends. Never on a timer or every frame.
function endRun(score) {
if (!window.GM) return; // the SDK did not load: the game still plays
GM.submitScore(score).then((ack) => {
if (!ack.ok) showScoreNotice(ack.code);
});
}
</script>The docs
| Page | Covers |
|---|---|
| Publishing | What to send, how a game moves from draft to live, builds, and uploading from CI. |
| Integrating | The SDK and the postMessage protocol: scores, achievements, saves and error codes. |
| Runtime | What the game frame allows and blocks, and how to build for it. |
| Troubleshooting | A score, an unlock or an upload that did not work. |
| Changelog | What changed for developers in the last 90 days, and what is being removed. |