Docs menu Coming from Poki
Coming from Poki
Last updated 2026-11-19
The FreeGames.gg SDK script also sets up PokiSDK, so a game built for the Poki SDK runs here with one change: the script tag.
Swap the script tag
Remove Poki’s script:
<script src="https://game-cdn.poki.com/scripts/v2/poki-sdk.js"></script>and put ours in its place, before your game’s scripts:
<script src="https://games.foony.com/sdk/v1.js"></script>Keep your PokiSDK calls as they are. Our script only sets up PokiSDK when no other script has, so Poki’s script MUST be gone. With both, the sdk_script check fails.
Calls that work
| Your game calls | What it does here |
|---|---|
PokiSDK.init() |
init(). Resolves when the page answers |
PokiSDK.gameLoadingStart() |
loadingStart() |
PokiSDK.gameLoadingProgress({percentDone: 50}) |
loadingProgress(0.5) |
PokiSDK.gameLoadingFinished() |
loadingFinished() |
PokiSDK.gameplayStart() |
gameplayStart() |
PokiSDK.gameplayStop() |
gameplayStop() |
PokiSDK.commercialBreak(onStart) |
commercialBreak(onStart). Resolves after the ad, or at once with no ad |
PokiSDK.rewardedBreak(onStart) or rewardedBreak({size, onStart}) |
rewardedBreak(). Resolves true only when the player earned the reward |
PokiSDK.happyTime(intensity) |
happyTime(). The intensity is ignored |
PokiSDK.shareableURL({room: 42}) |
Resolves with your game’s page on FreeGames.gg plus the query, like https://games.foony.com/game/block-drop?room=42 |
PokiSDK.getURLParam('room') |
Reads the query of your game’s frame, or '' |
Calls that do nothing here
| Your game calls | Here |
|---|---|
PokiSDK.isAdBlocked() |
Always false. A blocked rewarded ad resolves false anyway |
PokiSDK.displayAd(), destroyAd() |
Nothing. The page places its own banners |
PokiSDK.setDebug(), setLogging(), enableEventTracking(), measure() |
Nothing |
Things to check
- The ad rules are ours. The first game of a visit has no interstitial, and ads are at least 120 seconds apart (see Ads). Keep calling
commercialBreak()at every break, as Poki asks too. - Saves. Poki has no save module, so many Poki games use
localStoragedirectly. That works, but put it insidetry: some private windows block storage, and a game that crashes there fails a MUST rule. Or switch tosave.set()andsave.get(). - External links. Poki’s
openExternalLink()has no match here yet, and games MUST NOT open other pages. - Know the player. Poki has no player login. Here you can get a stable player id from the player token: call
FreeGamesSdk.init()next toPokiSDK.init(). Both share one start.
Test it
Load the build in the Inspector. The event log shows the FreeGames.gg call each PokiSDK call turns into, so you can check the order before you upload.