-
Notifications
You must be signed in to change notification settings - Fork 70
Conversation
Description
Extension for integrating games with GamePush: one build for 20+ web platforms (Yandex Games, VK Play, Telegram, CrazyGames, etc.).
Documentation: docs.gamepush.com
Plugin Capabilities
Initialization and platform checks (type, tag, language, device, orientation). Analytics (page hit, goal). Achievements, rewards, triggers, and reward schedulers. Segments and events. Leaderboards (global and scoped). Game collections, feedback, confirm overlay. Ads (preloader, sticky, fullscreen, rewarded). Player: sync, profile, login/logout, Player.Set/Get/Add variables. Pause, sound (mute music/SFX). Social: share, post, invite, join community. Payments: purchases and consume. Game and platform variables (fetch, value by key).
How to use the extension
Installation
- Download GamePush.json from the repository.
- In GDevelop: Project Manager - Extensions - Import extension - select
GamePush.json. - Actions and conditions will appear under Extensions - GamePush.
Setup and Usage
- Register your game in the GamePush panel.
- In the "Public zone" section, copy Project ID and Public Token.
- On first scene load, call Initialize GamePush (Project ID, Public Token).
- Before other GamePush calls, wait for GamePush is ready (e.g. loop: not ready - wait 0.1 s - repeat).
- Optionally show preloader/sticky banner and continue the scene.
- To learn how the SDK works, you can download the demo project.
Step-by-step Guide
1. SDK Initialization
Initialize once on first scene load (usually the starting scene):
- Call Initialize GamePush and provide Project ID and Public Token from the GamePush panel.
- Wait for GamePush is ready before any other calls.
- Once ready, you can use the rest of the plugin's actions and conditions.
2. Showing Ads
Recommended flow:
-
Ensure GamePush is ready.
-
Call the desired ad type:
- Preloader -- before the game loads.
- Sticky banner -- persistent banner (show/hide as needed).
- Fullscreen -- fullscreen ad.
- Rewarded -- rewarded ad (typically on player request for a reward).
-
For rewarded: wait for the result and grant the reward.
3. Adding a Purchase (Payments)
- Create products in the GamePush panel.
- Ensure GamePush is ready.
- Call Purchase with the item ID (or Tag).
- Handle the purchase result (success/error).
- Call Consume for consumable items if needed.
4. GamePush Player (Cloud Save)
Player data and variables are available after the SDK and player are initialized. You can read and write them at any time. Getting or setting values does not send requests to the server -- the player has a local copy on the device. To upload all variable changes to the server (one or many), call Sync.
5. Sound Module
The sound module syncs music and SFX mute state with the platform (Yandex Games, VK Play, etc.), so your game respects the player's sound preferences.
- Call Register game for sound sync once at scene start (together with playing music).
- Use Music is muted / SFX is muted to check the current state and update your UI (e.g. button labels "Music ON" / "Music OFF").
- Call Toggle music (or Toggle SFX) when the player clicks the sound button.
- The last mute states for music and SFX are saved automatically.
- The SDK automatically monitors ad display and mutes sound using these methods to comply with platform requirements.
Checklist
- I've followed all of the best practices.
- 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.
Example file
Extension file
Extension by @Sceef
You can update the extension on this "Pull Request" by commenting the update command: in the comment field, type !update, then drag and drop a zip file with your extension file in the commenting field, like how you initially submitted the extension. It should look like this:
!update [MyExtension.zip](https://github.com/GDevelopApp/GDevelop-extensions/files/12709661/MyExtension.zip)
It can take a few seconds for the file to fully upload and show as the above. Once it is like shown above, click "Comment" and let the bot do the rest!
4ee75e2 to
721a7c7
Compare