GameMaker integration
Native GameMaker setup, integration source and export guidance.
Downloads for this guide
GameMaker source packageSource + configuration/adapter + README; engine verification notes included.Download play_island.jsIndividual native integration source.Support and prerequisites
Integration source adapter; the native editor/export has not been verified. Validate your actual build under Play Island's sandbox before submission. The same per-game event registration and provider approval requirements apply. Download the source package and read README.txt before building. Browser samples never need a secret key.
Set up the project
Select the HTML5 target and add play_island.js as an extension. Register pi_connect and pi_status with no arguments and numeric returns; pi_report takes two strings and returns a number; pi_last_error takes no arguments and returns a string. Include client.js before extension startup in the HTML template. Adapt example.gml into your controller's Create, Step and successful-run events. A return of 1 from pi_report means queued; only pi_status returning to 1 signals acceptance. On -1 show pi_last_error and stop. Export HTML5, inspect the resulting index.html and local asset paths, then ZIP the export contents. No .yyp project is supplied and the native compiler has not been run.
Native integration example
// Add to an HTML5 extension. Define each exported function in the extension UI.
// Numeric return types. pi_report takes TWO string arguments; others take none.
// Include shared client.js before this extension via the HTML template.
var pi_state = 0; // 0 idle; 1 ready; 2 waiting; -1 failed
var pi_error = '';
function pi_connect() {
pi_state=2;
if (!window.PIExample) { pi_state=-1; pi_error='Missing client.js'; return 0; }
window.PIExample.connect().then(function() { pi_state=1; }).catch(function(error) { pi_state=-1; pi_error=error.message; });
return 1;
}
function pi_status() { return pi_state; }
function pi_last_error() { return pi_error; } // Register STRING return type.
function pi_report(name,json) {
if (pi_state !== 1) return 0;
pi_state=2;
try {
window.PIExample.report(name,JSON.parse(json)).then(function() { pi_state=1; }).catch(function(error) { pi_state=-1; pi_error=error.message; });
} catch (error) { pi_state=-1; pi_error=error.message; }
return 1; // Queued, NOT server-accepted. Poll pi_status() in Step.
}Event lifecycle and errors
The project uses the supplied client.js helper to call the real injected PlayIsland SDK. It waits for configuration and acknowledgement callbacks. The helper serializes reports, detects rejected events and stops after a timeout or rejection. It does not manufacture accepted events offline. The example's proposed registry permits score (integer 0–1,000,000) and progress (number 0–100); both are optional in that proposal. Staff must publish the relevant definitions for your game. Other games may have different required fields. Do not copy a built-in game's specialized counters. Wait for real gameplay before reporting completion; the server rejects completed within the first three seconds of a session. Stop after terminal acceptance; use started to begin a new run or reload the launcher. On error, display the reason, correct the problem and reload to obtain a clean sequence.
Test, export and submit
- Test the engine's own rendering and controls locally. A standalone/editor launch will not connect to Play Island.
- Build using the setup instructions above and inspect the resulting runtime files.
- Follow ZIP packaging and provider submission.
- Use the visual preview for loading/layout. Use a published /play/ launch for actual accepted-event tests.
- Verify configuration, accepted start/progress/result, guest behavior, signed-in receipts if configured, replay and mobile controls.
Saves, exit, platform leaderboard navigation and general player profiles are not available automatically to your new game. See feature availability before adding those buttons.
Engine reference
GameMaker HTML5 extensions explains the native engine/browser mechanism. The Play Island contract is defined by the platform implementation, not by the engine documentation.