You can use the Poki SDK extension in your own project by adding this project as a Defold library dependency.
Open your game.project file and in the dependencies field under project add:
or point to the ZIP file of a specific release.
Lua API corresponds to original JS API SDK:
poki_sdk.gameplay_start() -- in JS it's PokiSDK.gameplayStart() poki_sdk.gameplay_stop() -- in JS it's PokiSDK.gameplayStop() poki_sdk.commercial_break(function(self)end) -- in JS it's PokiSDK.commercialBreak() poki_sdk.rewarded_break(function(self, success)end) -- in JS it's PokiSDK.rewardedBreak() poki_sdk.set_debug(value) -- in JS it's PokiSDK.setDebug(value) poki_sdk.happy_time(value) -- in JS it's PokiSDK.happyTime(value), where value is between 0 and 1 -- Also, it's possible to check if AdBlock is active. -- The value updates ones when game init. poki_sdk.is_adblock_active()
It’s possible to use the original HTML5 integration manual, but this Defold SDK implements the following points from the original manual, so you can ignore them:
2. Initialize the SDK
3. Implement gameLoadingStart and gameLoadingFinished
7. Prevent page jump
When you get your PokiSDK Sitelock code, just add it to your game as:
html5.run("Sitelock JS code from Poki")
For security reasons, this piece of code is not public, so please request it from your Poki contact.
If you didn’t know about Poki.com before and going to contact them, I would be appreciated if you mention that you found out about them because of this SDK and PotatoJam studio.