/
Docs menu Developer docs
Developer docs
Everything you need to put an HTML5 game on FreeGames.gg: one script, five calls, and the rules your game meets. Start with your first game in 5 minutes.
Your first game in 5 minutes<script src="https://games.foony.com/sdk/v1.js"></script>
<script>
const sdk = window.FreeGamesSdk;
sdk.init().then(async () => {
sdk.loadingStart();
await loadMyGame((progress) => sdk.loadingProgress(progress));
sdk.loadingFinished();
});
</script>Start
- Your first game in 5 minutes Add FreeGamesSdk with one script tag and calls in four places of your game, see it work on your computer, test it in the Inspector with test ads, then ZIP and upload your HTML5 game.
- Requirements The MUST rules every game meets, the SHOULD guidelines, file limits, content rules, rules for players under 13, and every automatic check with how to fix it.
- Examples Short, complete code for the things most games need, a level-based game, a revive with a rewarded ad, saves, invite links, and sound and pause.
SDK
- SDK reference Every call of FreeGamesSdk v1 with a minimal example, how to install it (script tag, ES module, npm package, types), what init() returns, the order of calls, local mode, and how XP works.
- Events and the order of calls Which SDK calls to make at the start, at a game over, for a revive, between levels, and in a pause menu, and what the page measures from each one.
- Ads How ads work on FreeGames.gg, the rules that decide when an interstitial shows, where to ask for breaks, and how to offer rewarded ads.
- Cloud save Keep the player's progress with save.get and save.set. Saves follow signed-in players to every device, guests keep theirs in the browser, and the limits.
- Leaderboards Declare boards in the dashboard, send scores with leaderboard.submitScore, and read daily, weekly and all-time rankings with leaderboard.getScores.
- Know the player Use the player token from init() to get a stable player id on your own server, with no login screen. What you get back, the limits, and the errors.
Porting
- Coming from Poki Run a game built for the Poki SDK on FreeGames.gg by swapping one script tag. Which PokiSDK calls work, what they do here, and what to change.
- Coming from CrazyGames Run a game built for the CrazyGames HTML5 SDK v3 on FreeGames.gg by swapping one script tag. Which calls work, what they do here, and what to change.
- Google's Ad Placement API Keep your adBreak and adConfig calls from Google's Ad Placement API (H5 Games Ads). Remove Google's ad script, and the SDK runs them through the page's ads.
Engine guides
- HTML5 and JavaScript games Add FreeGamesSdk to a plain JavaScript or TypeScript game with a canvas. Loading progress, sizing, input, sound, pause, and a full game loop example.
- Phaser games Add FreeGamesSdk to a Phaser 3 game. Loader progress in the preload scene, gameplay events in your scenes, scaling, sound and pause.
- Unity WebGL games Add FreeGamesSdk to a Unity WebGL build with a WebGL template, a .jslib plugin and a small C# class. Loading, gameplay, ads, compression and memory.
- Godot games Add FreeGamesSdk to a Godot 4 web export with Head Include and JavaScriptBridge. An autoload script for loading, gameplay, ads, sound and pause.
Publishing
- Review What happens after you send a game. How long each step takes, what reviewers check, cooldowns, updates, and every review state with the message you see.
- How games are found Where players find games on FreeGames.gg, how the discovery test gives every new game the same number of test impressions, and what raises or lowers a game's share.
- Dashboard metrics The exact definition of every number on the developer dashboard, from impressions and plays to day 1 return and crash rates, and the rules they all follow.
- The Inspector Test your build in the real game frame before you upload. The Inspector logs every SDK call, has test ads and phone sizes, and runs the same load checks as an upload.