We’re happy to finally announce the availability of the first public release of the long awaited Google Play Game Services extension for Android! The extension does currently support authentication and cloud save and it has been tested in production in Look Your Loot by @Dragosha (thanks!).
We are currently looking for community contributors to add more functionality such as achievements and leaderboards. Head to the GitHub page of the extension to start contributing or to learn more!
achievement_reveal(id)
achievement_unlock(id)
achievement_set(id, steps)
achievement_increment(id, steps)
achievement_show()
achievement_get() -- async listener callback with list of achievements. json.decode() it
testing achievements right now and everything but increment seems to work. Maybe im doing something wrong, but the achievement stays at 0%, incrementing does nothing.
Should I do it at start of the app, or have them press a button to sign into Google Play GS?
function gpgs_callback(self, message_id, message)
if message_id == gpgs.MSG_SIGN_IN or message_id == gpgs.MSG_SILENT_SIGN_IN then
if message.status == gpgs.STATUS_SUCCESS then
print("gpgs.get_id()", gpgs.get_id())
print("gpgs.get_display_name()", gpgs.get_display_name())
if sys.get_config("gpgs.client_id") then
print("id_token: ", gpgs.get_id_token())
print("auth_code: ", gpgs.get_server_auth_code())
end
end
end
print("gpgs.is_logged_in()", gpgs.is_logged_in())
end
function init(self)
if gpgs then
gpgs.set_callback(gpgs_callback)
gpgs.silent_login()
timer.delay(2, false, function()
if not gpgs.is_logged_in() then
gpgs.login()
end
end)
end
end
Not sure what I’m doing wrong. The signin UI shows for a moment then auto-dismisses. I did download
Look, Your Loot! and it seemed to sign in properly.