Extension update: <PlaygamaBridge> - #2273
Open
github-actions[bot] wants to merge 1 commit into
Open
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
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.
Changes
Social
IsPostRewardSupported,GetPostRewardandOnGetPostRewardCompleted, with the rewards read throughPostRewardsCount,PostRewardId,PostRewardAmount,PostRewardTypeandPostRewardsAsJSONCreatePosttakes an optionalPayload— the game's own string for that one post, handed back throughPlatformPayloadwhen someone opens itShare,InviteFriendsandCreatePostaccept the id of an entry declared inplaygama-bridge-config.json(social.shares,social.invites,social.posts), so the text, image and link live in the config instead of the eventsPlatform
PlatformLaunchSource— tells whether the game was opened from a notification or from one of its own postsPlatformDataValueandPlatformDataAsJSON— the launch parameters the platform passed to the game, includingpostIdwhen it was opened from a postPlatforms
Changed
How to use the new features
Post rewards let a game reward two people: the player who opened the game from a post,
and the author of that post, once other players come through it. The rewards themselves
are declared per post in
playgama-bridge-config.json, so the events stay simple:Then, on startup:
The list is empty when there is nothing to grant, and the platform backend decides who is
rewarded and when, so the game only reads what it gets.
PlatformLaunchSourceandPlatformDataValue("postId")tell the game it was opened fromone of its own posts and which post that was, which is what makes level sharing possible:
put the level into the payload of
Create Post, then read it back withPlatformPayload.Checklist
Example file
bridge-gdevelop-examples.zip
Extension file
PlaygamaBridge.zip
Extension by @davitsedrakian
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: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!