How do I configure Google Play Leaderboard ?

Discussion and feedback on Construct 2

Post » Tue Apr 28, 2015 7:14 am

Hi Guys,
I have created a game that I want to publish it in the Google play. But I have issue with integrating google play leaderboard into my game.

I went to developer console created my app.
Then went to the Game Services, added a new game, added the details. Then click on the Linked apps and created one for the Android.
Image
Then added the application ID and client ID into the Google play plugin in construct2. Since I am not getting any Client secret when I use android and that is only for web I am not setting that.
Image
Then I added a block of function to on layout load sign in to google play.
Image
However my game crash as soon as it tries to sign in.

I have also tried using [url]http:/localhost[/url] and that giving me error 401 as soon as the game starts on the device.

I am totally confused what to do, does anyone know what I should do to make this working? I have also follow this tutorial https://www.scirra.com/manual/175/google-play but this one is referring to use a web app within the game services then I don't know what the url should be.

Does anyone know any good tutorial on that?

Many thanks in advance.
B
5
S
1
Posts: 35
Reputation: 447

Post » Tue Apr 28, 2015 9:27 am

I would recommend you to use "CranBerry" plugins instead. As far as I know, the Scirra Google Play plugin has some bugs, but you can use CranBerry plugins to fix that. For more info please check out this topic: viewtopic.php?t=109586

Good luck! :)
B
23
S
3
G
3
Posts: 26
Reputation: 1,832

Post » Tue Apr 28, 2015 10:57 am

Hi @lamies thanks for getting back to me. I don't know where to find the plugin and how to install it. so for example how do I then sign in ? Do I actually need to hard code the functions into the index file? or there is a neat way of construct2 style for that?

Cheers.
B
5
S
1
Posts: 35
Reputation: 447

Post » Wed Apr 29, 2015 10:55 am

@zardaloop, actually it is simple like using events of the Cranberry plugin, like "Login". You can download it at the community CranBerry created for that: https://plus.google.com/communities/117 ... b10fa7a0a8, it is called Phonegap Game (Free, Cordova extension > game)

You just have to download the plugin, and then create a new folder in the "Plugins" folder of Construct, then extract the contents of the plugin there, at this way you can install the plugin. After that, there are multiple tutorials in the community which will help you to configure your leaderborads, but is actually really easy to do so =) If you have questions about CranBerry plugins, you can also ask in the community above, he always tries to answer every message; if not, users in the community will help as well ^^
B
23
S
3
G
3
Posts: 26
Reputation: 1,832


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests