Skip to content

[Community] [ZokoGames] Add the ZokoGames SDK extension - #2372

Open
idimetrix wants to merge 1 commit into
GDevelopApp:mainfrom
zokogames:add-zokogames-extension
Open

idimetrix wants to merge 1 commit into
GDevelopApp:mainfrom
zokogames:add-zokogames-extension

Conversation

@idimetrix

Copy link
Copy Markdown

Description

Adds the ZokoGames extension (version 1.7.2). It wraps the ZokoGames JavaScript game SDK as GDevelop actions, conditions and expressions: ad breaks and rewarded ads, cloud saves, leaderboards, achievements and rooms.

The extension is only useful for games published on zokogames.com (https://zokogames.com), a browser-games portal. At runtime it loads the SDK script from sdk.zokogames.com. Outside the portal the SDK runs in a local mode, so a game still runs in the editor preview and in other HTML5 exports.

Validator allowance: the extension needs one extra property on gdjs, _zokoGamesExtension. It is a single namespaced object that holds the SDK bridge state (loaded SDK, pending calls, callbacks) across scenes. It is declared in ExtensionSpecificAllowance in scripts/lib/ExtensionsValidatorExceptions.js, as other community extensions did in their own pull requests (for example #1717). If you prefer to add that entry yourself, drop that file from this PR.

How to use it

Add the extension, then call "Initialize ZokoGames" at the start of the game. After that the actions, conditions and expressions are available under the ZokoGames category (for example show an ad break, submit a score to a leaderboard, unlock an achievement, save and load cloud data).

Tested with GDevelop 5.6.287: the extension was imported in the web editor, and an HTML5 export was run in a browser against the SDK's local mode. npm run build, npm test, npm run check-post-build, npm run check-format and npm run check-types pass.

Example project

Example project folder (ZIP): https://zokogames.com/starter-kits/gdevelop.zip

The GitHub CLI cannot attach files, so it is linked from the ZokoGames site. It is the whole project folder with its events, not a build. I can upload the ZIP to this pull request through the web interface if you want it attached.

Checklist

  • I've followed all of the best practices. The checks of this pull request must pass.
  • New extensions are added to extensions/community/.
  • The example project is the whole folder of my project, not a build of my game.
  • The example project is attached as a ZIP file, not linked to an external service like Google Drive. (Linked from our own site, see above.)
  • I've considered adding my extension to the GDevelop community list, but think it's better to have it here.
  • I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

AI usage

  • I used an AI to generate some part of the code.
  • I don't understand the generated code or I don't feel able to modify it.

@idimetrix
idimetrix requested review from a team as code owners November 23, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant