PokiSDK: GDevelop
Integrating the Poki SDK in GDevelop: the same five event moments as every engine, with GDevelop-specific setup.
Integration outline
- Set up the SDK for GDevelop. Use GDevelop's built-in Poki export and events.
- Signal loading: fire
gameLoadingFinished()when your game is done loading, so conversion to play is measured correctly. - Gameplay events: fire
gameplayStart()on the player's first input and every return to gameplay;gameplayStop()on every interruption (pause, level end, game over, menu). - Ads: implement
commercialBreak()at natural breaks before returning to gameplay, andrewardedBreak()for opt-in rewards. Mute audio and disable input during ads. - Test with the Poki Inspector to verify the event flow.
Event rules and the full order-of-events reference live in the SDK overview.
This is the Poki Games SDK extension for GDevelop, the open-source, no-code game engine. Because GDevelop uses a visual event system instead of traditional code, the SDK is integrated entirely through actions, conditions, and expressions, with no scripting required. The Poki functions map to the JavaScript API as follows:
Actions, conditions, and expressions
Actions
Gameplay started -- in JS: PokiSDK.gameplayStart()
Gameplay stopped -- in JS: PokiSDK.gameplayStop()
Commercial break -- in JS: PokiSDK.commercialBreak()
Rewarded break -- in JS: PokiSDK.rewardedBreak()
Game loading finished -- in JS: PokiSDK.gameLoadingFinished()
Create shareable URL -- in JS: PokiSDK.shareableURL({})
Open external link -- opens a URL via the Poki SDK
Move Poki Pill -- repositions the Poki Pill on mobile
Measure event -- sends an analytics event to PokiConditions
Poki SDK is ready -- check if the SDK is initialized
Commercial break just finished playing -- fires once after a commercial break ends
Commercial break is playing -- true while a commercial break is active
Rewarded break just finished playing -- fires once after a rewarded break ends
Rewarded break is playing -- true while a rewarded break is active
Should reward player -- true if the player watched the full rewarded adExpressions
PokiGamesSDKHtml::LastShareableURL() -- the last generated shareable URL
PokiGamesSDKHtml::URLParam("paramName") -- read a URL param (supports gd-prefixed params)Install the extension
Open your GDevelop project, go to the Project Manager, and click Create or search for new extensions. Search for Poki and install the Poki Games SDK extension. Once installed, the extension's actions, conditions, and expressions are available in your event sheets.
Gameplay events
Use gameplayStart() to mark when players are playing your game (for example level start and unpause). Use gameplayStop() to mark when they aren't (for example level finish, game over, pause, or quit to menu). In GDevelop, add these as actions in your event sheet:
Condition: [Player clicks or taps to start]
Action: Poki Games SDK > Gameplay started
Condition: [Player dies / level ends / game pauses]
Action: Poki Games SDK > Gameplay stoppedcommercialBreak
Commercial breaks show video ads and should be triggered at natural breaks in your game. Throughout the game we recommend triggering a commercial break before every gameplayStart(), that is, whenever the player has shown intent to continue playing. It's important that the gameplay started event isn't fired during the ad, only after gameplay resumes.
Condition: [Player clicks "Play Again" or "Next Level"]
Action: Poki Games SDK > Gameplay stopped
Action: Poki Games SDK > Commercial breakThen handle the ad finishing:
Condition: Poki Games SDK > Commercial break just finished playing
Action: Poki Games SDK > Gameplay started
Action: [Your action to resume/start the game]rewardedBreak
Rewarded breaks let a player choose to watch a rewarded video ad in exchange for a benefit in the game (more coins, for example). When using a rewarded break, make it clear to the player beforehand that they're about to watch an ad.
Condition: [Player clicks "Watch Ad for Reward"]
Action: Poki Games SDK > Gameplay stopped
Action: Poki Games SDK > Rewarded breakThen handle the result using both conditions together:
Condition: Poki Games SDK > Rewarded break just finished playing
AND Poki Games SDK > Should reward player
Action: [Give the player their reward]
Action: Poki Games SDK > Gameplay startedCondition: Poki Games SDK > Rewarded break just finished playing
AND NOT Poki Games SDK > Should reward player
Action: [No reward - player skipped or ad did not play]
Action: Poki Games SDK > Gameplay startedFinal steps
Disable sound and input during ads
Make sure audio and keyboard input are disabled during ads so the game doesn't interfere. You can use the Commercial break is playing and Rewarded break is playing conditions to detect when an ad is active:
Condition: Poki Games SDK > Commercial break is playing
OR Poki Games SDK > Rewarded break is playing
Action: [Mute audio / disable player input]Alternatively, mute before requesting the break and unmute in the "just finished playing" event.
Shareable URLs
You can create a shareable URL using a structure variable:
- Create a structure variable (for example
ShareParams) with child variables likeid,type, andscore. - Use the action Poki Games SDK > Create shareable URL and pass in
ShareParams. - Read the generated URL with the expression
PokiGamesSDKHtml::LastShareableURL().
To read URL parameters (including Poki's gd-prefixed params), use the expression:
PokiGamesSDKHtml::URLParam("id")This returns either the gdid param set on poki.com or the id param on the current URL.
Poki Pill on mobile
If the Poki Pill overlaps your UI on mobile, reposition it with the Move Poki Pill action:
TopPercent: a value between0and50.TopPx: an additional pixel offset.- The Poki default is
TopPercent = 0andTopPx = 20.
Upload and test your game in Poki for Developers
Congratulations, you've implemented the PokiSDK. Now upload your game to the Poki Inspector and test it there. When you're happy with the implementation, send us a review request and we'll play the game. If you get stuck, reach out via Discord or developersupport@poki.com.
Extension source and reference
For the full list of actions, conditions, and expressions, see the GDevelop Poki SDK reference page.