SDK docs
GameMaker HTML5
Upload a browser export and use a small JavaScript extension bridge for SDK calls from GML.
Export checklist
- Export the project for HTML5 and keep index.html at the ZIP root.
- Include all generated data and JavaScript files from the HTML5 export.
- Do not include mobile ad extensions in the web build.
Bridge the SDK
Create or use a project-local JavaScript extension that forwards a GML action to window.PlayKovoSDK. Keep the GML fallback path available when the bridge is absent.
// JavaScript extension function
function playkovo_interstitial(placement) {
return window.PlayKovoSDK?.showInterstitial({ placement })
?? Promise.resolve({ status: "unavailable" });
}
// GML usage: call at a natural level-complete state, not in Step events.Pause and sound
PlayKovo pauses your game during ads, while the app menu is open and when the tab or app is in the background, and mutes it from the player's sound button. Forward those events into the engine. The check for isMuted skips this on SDK 1.x, so the same build runs on both versions.
// JavaScript extension: forward platform events into GML
function playkovo_listen() {
const sdk = window.PlayKovoSDK;
if (!sdk || !sdk.isMuted) return;
sdk.on("pause", () => gml_Script_gmcallback_pk_pause());
sdk.on("resume", () => gml_Script_gmcallback_pk_resume());
sdk.on("audio", (e) => gml_Script_gmcallback_pk_audio(-1, -1, e.muted ? 1 : 0));
}
// GML: gmcallback_pk_pause stops your step logic and calls audio_pause_all().Test before review
Test the final HTML5 export in the hosted player. The level-complete state must continue even when the browser bridge returns unavailable.
One SDK, every web engine