The Player namespace used in the PlayersClient
autoload is a very common name for games of all sorts, so I renamed it to be PlayGamesPlayer
instead. This is a new major version since it breaks backward compatibility, make sure to update your code if you were using a previous version of this plugin.
The GDScript classes and enums renamed are:
Player
class turned intoPlayGamesPlayer
PlayerLevelInfo
class turned intoPlayGamesPlayerLevelInfo
PlayerLevel
class turned intoPlayGamesPlayerLevel
PlayerFriendStatus
enum turned intoPlayGamesPlayerFriendStatus
Ass suggested by @TheSkyOne in this issue, when calling to SnapshotClient.load_game()
and the snapshot is not found, the game_loaded
signal will now return a null, instead of not being emitted at all as before.
As suggested by @RProduction in this issue, I added an origin
field to the SnapshotConflict
object coming in the SnapshotClient.conflict_emitted
signal. This field value is either SAVE
or LOAD
, indicating what method originally triggered the Snapshot conflict.
The plugin version was not updated in v1.8.0
, causing confusion to users of the plugin. This patch fixes it.
Thanks to TheSkyOne for bringing to my attention that the plugin wasn't working for Godot 4.3. I've update it to use version 4.3 of the Godot Library Dependency.
Google's play-services-games-v2
dependency was updated from version 19.0.0
to version 20.1.2
.
The gameLoaded
and conflictEmitted
signals where sending an instance of the Dictionary class. Instead, they send a JSON string now, as suggested by @nepalisameer in this issue.
The SnapshotsClient.load method from Google's API has been added, returning the list of Snapshots for the current signed in player.
When calling the loadGame
method with a non existing file name, the app crashed. This is fixed now, the app just prints a log with the error and continues execution.
Added the createIfNotFound
parameter to the loadGame
method, with a default value of false
to not break backwards compatibility. This parameter creates a new snapshot if the file name does not exist.
Added new method to delete snapshots by snapshot id.
Added three new methods for events API:
- incrementEvent
- loadEvents
- loadEventsByIds
The autoloads where causing errors on first launch of the project, due to the load order and dependencies between them. The load order has now been fixed to avoid this errors. Also, the plugin is now disabled by default in the demo project. Look at the demo project documentation for further info.
The loadPlayerCenteredScores method from Google's API has been added to the plugin. This method returns a list of scores, centered in the signed in player, for a given leaderboard. There's no example in the demo app yet, but it's usage is documented in the code itself.
The loadTopScores method from Google's API has been added to the plugin. This method returns the top scores of a leaderboard for a given leaderboard. There's no example in the demo app yet, but it's usage is documented in the code itself.
In the new dock that the plugin adds to the bottom bar, the max length of the Game ID has been increased from 12 to 20 characters.
Also, the input of the user is now converted to a number, stripping any letters or symbols from it.
Thanks to @godfryd for pointing this issue out in this issue.
Added the requestServerSideAccess
method to the plugin to request a server side access token, in case the users of the plugin want to develop a backend to communicate with the web REST API that Google provides.
Thanks to @AndrewSumsion for the suggestion.
The Game
inner class in the SnapshotsClient
autoload was renamed to GameInfo
to avoid possible common clashes with games who might already use that name in their own namespace, as suggested by @g-libardi in this issue.
The userSignedIn
signal is deprecated in favor of the already existing userAuthenticated
signal. Now both isAuthenticated
and signIn
methods, emit the same signal.
Added some fake logging to the main menu. The Title of the screen shows different messages to show some common problems, like plugin not loaded or user not signed in.
The leaderboards_client.gd
script had a wrong call to the android plugin in the show_leaderboard
function. Thanks to mrbut1995 for finding it and notifying!
- Display saved games in new window that allows to load and delete saved games.
- Save game data.
- Load game data.
- Receive conflicting game data (not possible to resolve the conflict manually yet).
All properties of leaderboards, achievements, scores and players containing URI to images, where pointing to the content://
resource, which was not accessible from Godot. This has been fixed, downloading the content://
resource to the device, in the user:/
Godot path, making the images available from Godot.
New signal imageStored
, sent when an image is written to the device.
- Authenticate.
- Sign in.
- Increment and unlock achievements.
- Reveal achievements.
- Load achievements.
- Show achievements.
- Show leaderboards.
- Submit scores.
- Load Scores.
- Load leaderboards.
- Load friend list.
- Compare profiles.
- Search players.
- Load current player.