Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inExtensionSpecificAllowanceinscripts/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-formatandnpm run check-typespass.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
extensions/community/.AI usage