Google play leaderboard with Crosswalk

Get help using Construct 2

Post » Tue Sep 22, 2015 12:47 pm

@Stevekane Ofcourse, you need to use the same ID.
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Mon Sep 28, 2015 9:18 am

@sudeep98 Thanks, i've followed in instructions on this thread but i'm unable to get it working. When i click on my leaderboard button on my game, nothing happens. I've completed all the steps in the Google Play services section (leaderboard, achievements etc.) but i haven't published it yet as i wanted to test it before. I've signed up for the testing program and downloaded the beta version of my game through google play but it's not working for me.

Do i need to publish Google play services in order for it to work?

Also, in Intel XDK, in the plugins section, i ticked Google Play Services, is that nessessary?
B
5
S
2
Posts: 116
Reputation: 867

Post » Mon Sep 28, 2015 9:28 am

@panrebonka
Even I suggest using Crannyberrygames' "Game" plugin too. I have used it in my game and it works super fine!

I have 3 Leaderboard and about 8 different achievements to unlock

You can try my game "Last of the Survivors" from the below link :)
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
11
G
2
Posts: 418
Reputation: 5,239

Post » Mon Sep 28, 2015 12:00 pm

@SteveKane
I think there was a mistake. The ID to be use in the Phonegap Game plugin is your Google Play services ID, whereas the ID to be used in the "Show leaderboard" action is the leaderboard ID which you get when you create a leaderboard.

I'm sorry for misguiding you and I was confused at that time. Please make the changes and try again.
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Tue Sep 29, 2015 10:00 am

@sudeep98 It's fine, no worries, i appriciate you taking time out to help.

I've changed what you've said to do but it's still not working. I've set an event which checks if the user is online at start of the layout and if they are online, login user, but it's not doing that for me.

Is it not working because i haven't published Google Play Services? I've done all the requirements but haven't published as i wanted to test it first. I'm part of the testing & beta access so it should work but its not.
B
5
S
2
Posts: 116
Reputation: 867

Post » Tue Sep 29, 2015 11:46 am

Yes, you need to publish game services. Set the game in alpha or beta testing mode, don't promote to prod (if you do it will be available to the public). You'll get a link in Opt-in URL in the alpha and beta testing once the app is published (Sometimes it takes time). Then open that in your mobile and click "become a tester". Now, you can test your game with the Google Play Services.

@SteveKane
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Tue Oct 06, 2015 1:36 pm

@sudeep98 For some reason, it's not working for me. I've followed the instuctions on here and have managed to get everything set up, but when i go to test the Google Play services, nothing happens. I've got it set up so that it logins at the start of the layout, but nothing happens and if i try to click on the leaderboard button, it does nothing.

I've set up the Alpha and Beta testing on Google and have downloaded the Beta version of my game after publishing Google Play Games but am not getting anything. I know that it says that you can test Play services in Beta but has it worked for you in Beta? I don't want to publish the game until i'm sure that the Play services works first.
B
5
S
2
Posts: 116
Reputation: 867

Post » Wed Oct 07, 2015 5:31 pm

It has to work. Please cross check your events once. Did you enter the leaderboard ID correctly? Please check each and everything once again. I hope you uploaded a flawless .apk but sometimes we commit mistakes.

If you are able to login, you are able connect to the Google Play services which means it's working. Did you use the action 'submit your score to the leaderboard (assuming that your using the leaderboard to compare scores)'.

Try the following, if you haven't did before
On clicked leaderboard button ->
->is logged in -> submit score to leaderboard "ID"
-> Show leaderboard
->else -> login
-> submit score to leaderboard "ID"
-> Show leaderboard

@SteveKane
B
24
S
7
Posts: 335
Reputation: 2,220

Post » Thu Oct 08, 2015 2:20 pm

@sudeep98

The problem i've got is that my game is not logging in to Google Play Services, i can't check the leaderboard as it doesn't login.

It seems simple enough to create an event to login, this is what i've got - 'Start of layout' - PhonegapGame - Login

I've copied and pasted the following into my 'intelxdk.config.additions.xml' -

<intelxdk:plugin intelxdk:name='https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.game#45191b3570a2ae4dc9646685b65f4a7994ed9952' intelxdk:value='https://github.com/cranberrygame/com.cranberrygame.phonegap.plugin.game#45191b3570a2ae4dc9646685b65f4a7994ed9952' >
<intelxdk:param intelxdk:name='APP_ID' intelxdk:value='YOUR_GOOGLE_PLAY_GAME_APP_ID' />
</intelxdk:plugin>

I've replaced 'YOUR_GOOGLE_PLAY_GAME_APP_ID' with my Google Play Games ID, although i've left 'APP_ID' as it is as there was no mention of changing this, should i insert my App ID here too?

Also, i haven't checked anything in the Plugins section in Intel XDK, do i need to check anything?

I've done whats been mention on this thread but i don't know why its not working for me.
B
5
S
2
Posts: 116
Reputation: 867

Post » Tue Jan 26, 2016 12:22 pm

MACPK wrote:I wouldn't recommend to use the scirra "Google Play Games" Plugin on mobile (crosswalk/phonegap exports). You are using the web-facing login that would work anywhere but this is not what users expect on mobile devices. Use the cranberry "game" plugin for that. It is really great and works for ios and android at the same time.

The cranberry plugin opens the in-app-login to the game service, It looks and feels more integrated. The most important part is that you can just open the "leaderboards" and "achievements" with one command. The scirra plugin just supports you with the data so you will have to build your own lists and views (complex). Both plugins should work on cordova exports though I think.

Here is a game of mine if you want to see the cranberry "game" plugin in action:
https://play.google.com/store/apps/deta ... zardattack


@MACPK Would you still recommend cranberry? I get "Error: Plugin "cordova-plugin-game" (1.0.114) failed" with XDK and absolutely nobody seems to know what is causing this.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,253

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Fradno, marcinkowski, tarek2 and 11 guests