SDK Reference
@pixlland/sdk — TypeScript-first runtime your game loads inside the iframe. Mirrors the Poki SDK contract so games can migrate with minimal changes. Full API reference below is auto-generated from TypeScript JSDoc on every release.
Browse the API
Full TypeDoc reference — every type, method, parameter, and example. Searchable, with cross-links between related symbols.
Source on GitHub
Source for @pixlland/sdk — TypeScript, MIT licensed. Includes the wire protocol (messages.ts) and the shell template.
Quick start
<!-- In your game's HTML -->
<script src="https://pixlland.com/sdk/v1/pixlland.js"></script>
<script type="module">
// Lifecycle order (mirrors Poki):
await PixllandSDK.init();
PixllandSDK.gameLoadingProgress(0.5);
PixllandSDK.gameLoadingFinished();
PixllandSDK.gameplayStart();
// ...gameplay loop...
PixllandSDK.gameplayStop();
// Ad break (Promise resolves when ad ends or skipped)
await PixllandSDK.commercialBreak();
// Rewarded ad
const { granted } = await PixllandSDK.rewardedBreak();
if (granted) player.coins += 100;
</script>Game shell template
Drop-in shell that auto-loads the SDK and wraps your game in an iframe. Useful while you don't have your own bootstrap HTML.
https://pixlland.com/games/_shell/index.html?game=your-entry.html&gameId=my-gameVersioning
The SDK lives at /sdk/v1/pixlland.js. Patch and minor versions ship transparently behind the same URL — your game keeps working. Breaking changes get a new path (/sdk/v2/...); v1 stays available for one year of overlap.
