State of the Google Play Plugin

Post » Thu Apr 12, 2018 12:49 am

Silviu wrote:
KENYONB wrote:The manual notes to use APP ID for the GAME ID, and that is all that is required, but I added APP ID in APP ID and GAME ID and included the CLIENT ID anyway.

APP ID and CLIENT ID can be found by going to Google Play game services, Linked Apps, and scrolling to the bottom.

Click on the Google Play plugin under project in left column in Construct 3, enter the info in the properties column on the left, then give it a go.


Hey thanks for this. I managed to make it Sign In automatically when I open the game. I see that you managed to make the Leaderboard work. Could you please tell me a bit about that? At the end of the game I do "submit score to leaderboard" and then I have a button which, on tapped, should "request public all-time hi-scores from ...". It seems that the submit part fails (I tested this in preview). I uploaded my game on Google Play Console, linked it to Android and Web app and I used in Construct 3 the Client ID from the Web app. As URLs I have https://preview.construct.net https://preview.construct.net/local and http://localhost. The app is signed and it can be well downloaded from Google Play. I guess I am still missing something from the Google Console setup. Any help would be greatly appreciated.


Great job getting your game to sign in.

For the Leaderboard, here's what I am doing. And just for reference, this is an endless runner game.

I set the score from a global variable when the player dies touch a sprite. I use the global variable for the score, leave tag blank, and then enter my leaderboard ID. Here is the event:
+ Player_move: On collision with NAME_OF_SPRITE
-> GooglePlay: Submit score YOUR_SCORE_GLOBAL VARIABLE (tag "") to leaderboard "YOUR_LEADERBOARD_ID"

Then to show the leaderboard, I have a graphic with a trophy, when the player clicks it, it shows the GooglePlay leaderboard that the score was submit to. Here are the events:
+ Touch: On touched NAME_OF_SPRITE
-> GooglePlay: Display leaderboard "YOUR_LEADERBOARD_ID"

Remember, in order to test, you need to sign the APK. So export as Android project, sign, and then install and test. Hope this helps.
Play Ball Walker App Store | Google Play | Amazon
Image
B
46
S
9
Posts: 195
Reputation: 3,137

Post » Thu Apr 12, 2018 8:08 pm

KENYONB wrote:
Silviu wrote:
KENYONB wrote:The manual notes to use APP ID for the GAME ID, and that is all that is required, but I added APP ID in APP ID and GAME ID and included the CLIENT ID anyway.

APP ID and CLIENT ID can be found by going to Google Play game services, Linked Apps, and scrolling to the bottom.

Click on the Google Play plugin under project in left column in Construct 3, enter the info in the properties column on the left, then give it a go.


Hey thanks for this. I managed to make it Sign In automatically when I open the game. I see that you managed to make the Leaderboard work. Could you please tell me a bit about that? At the end of the game I do "submit score to leaderboard" and then I have a button which, on tapped, should "request public all-time hi-scores from ...". It seems that the submit part fails (I tested this in preview). I uploaded my game on Google Play Console, linked it to Android and Web app and I used in Construct 3 the Client ID from the Web app. As URLs I have https://preview.construct.net https://preview.construct.net/local and http://localhost. The app is signed and it can be well downloaded from Google Play. I guess I am still missing something from the Google Console setup. Any help would be greatly appreciated.


Great job getting your game to sign in.

For the Leaderboard, here's what I am doing. And just for reference, this is an endless runner game.

I set the score from a global variable when the player dies touch a sprite. I use the global variable for the score, leave tag blank, and then enter my leaderboard ID. Here is the event:
+ Player_move: On collision with NAME_OF_SPRITE
-> GooglePlay: Submit score YOUR_SCORE_GLOBAL VARIABLE (tag "") to leaderboard "YOUR_LEADERBOARD_ID"

Then to show the leaderboard, I have a graphic with a trophy, when the player clicks it, it shows the GooglePlay leaderboard that the score was submit to. Here are the events:
+ Touch: On touched NAME_OF_SPRITE
-> GooglePlay: Display leaderboard "YOUR_LEADERBOARD_ID"

Remember, in order to test, you need to sign the APK. So export as Android project, sign, and then install and test. Hope this helps.

Hey, I did that, but it still doesn't work. Did you link the app with Web or with Android on google console? And did you do anything special to the leaderboard on google console, other that the obvious steps of creating it? Also it seems that the auto sign In doesn't work on the phone. On preview I allowed pop-ups and it works here, but on the phone it seems to be loading, but nothing shows.
B
8
S
2
Posts: 83
Reputation: 722

Post » Fri Apr 13, 2018 12:03 am

Silviu wrote:Hey, I did that, but it still doesn't work. Did you link the app with Web or with Android on google console? And did you do anything special to the leaderboard on google console, other that the obvious steps of creating it? Also it seems that the auto sign In doesn't work on the phone. On preview I allowed pop-ups and it works here, but on the phone it seems to be loading, but nothing shows.


I linked the app with Android, not Web.

I created the leaderboard then published it. Make sure it says "Published" in upper right. Other than that, that's all I did.

Once I got sign in to work, the pop-up showed asking which account I wanted to sign in with, i selected, then it was done. I haven't seen it since. Every time I play, the status bar and navigation buttons show briefly, then disappear. I tested on another device and it only asked for sign in once, and then I'm signed in each time I play.
Play Ball Walker App Store | Google Play | Amazon
Image
B
46
S
9
Posts: 195
Reputation: 3,137

Post » Fri Apr 13, 2018 7:46 am

This is an obvious no brainer, but I can mention it anyway: Open up Google Play app on your mobile phone just to make sure the app is on, it is set up correctly, that the app itself is logged in with your account , and that the settings is correct. (It is set to Official, visible, used for login etc)
B
19
S
6
G
1
Posts: 225
Reputation: 2,420

Post » Thu May 03, 2018 6:43 pm

Guys, I have a similar problem.

I have this code in the beginning.
On start of layout,

trigger once Cocoon Request login
cocoon is not logged in

I have this, when the game starts, it appears the login screen of google play, my data appears, when I hit Allow, it just disappears and the message that has failed appears (I have implemented also if login fails, message appears)

I've already checked everything I think it might be, the game ID is inside the app, and I can not log in,
I have the achievements and highscore implemented, but I can not open it either, since I can not log in ...
and each time I start a new level, it appears to log, and disappears. Not Logging In
B
3
Posts: 8
Reputation: 193

Post » Fri May 11, 2018 12:05 am

camboriu wrote:Guys, I have a similar problem.

I have this code in the beginning.
On start of layout,

trigger once Cocoon Request login
cocoon is not logged in

I have this, when the game starts, it appears the login screen of google play, my data appears, when I hit Allow, it just disappears and the message that has failed appears (I have implemented also if login fails, message appears)

I've already checked everything I think it might be, the game ID is inside the app, and I can not log in,
I have the achievements and highscore implemented, but I can not open it either, since I can not log in ...
and each time I start a new level, it appears to log, and disappears. Not Logging In


Sorry, but why are you using Cocoon if you can build mobile games with Construct 3?
Play Ball Walker App Store | Google Play | Amazon
Image
B
46
S
9
Posts: 195
Reputation: 3,137

Post » Fri May 18, 2018 1:15 pm

Good morning Kenyonb, sorry for the delay, I installed a necessary plugin and ended up having more problems than expected, then I got a little disappointed .. but I'm coming back, the reason I use cocoon is that I'm almost finishing the project in construct2, I just needed this part of google, I needed to use new plugins and new codes, what happens now is the following, when the game opens, it loads google play, it is loading and stops, there is no error and no messages, just no log ...
About construct3, I do not use Cocoon? Does C3 itself build?
I currently use Construct2 because my partner owns the license, but I'm looking to migrate to C3 after this project, in fact I'm even thinking of exporting to C3 to avoid some problems, do you think this can be solved in C3?
sorry for my bad english, XD

KENYONB wrote:
camboriu wrote:Guys, I have a similar problem.

I have this code in the beginning.
On start of layout,

trigger once Cocoon Request login
cocoon is not logged in

I have this, when the game starts, it appears the login screen of google play, my data appears, when I hit Allow, it just disappears and the message that has failed appears (I have implemented also if login fails, message appears)

I've already checked everything I think it might be, the game ID is inside the app, and I can not log in,
I have the achievements and highscore implemented, but I can not open it either, since I can not log in ...
and each time I start a new level, it appears to log, and disappears. Not Logging In


Sorry, but why are you using Cocoon if you can build mobile games with Construct 3?
B
3
Posts: 8
Reputation: 193

Post » Fri May 18, 2018 11:28 pm

@camboriu Construct # will eventually be able to build signed APKs. But for right now, you can build an Android Studio Project, open in Android Studio, then build a signed APK from that.

Also, all this time i thought you were referring to issues with Google Play Game services for Construct 3, but you're talking about Construct 2? I haven't bothered with the plugin in C2, only C3. Trying to move everything to C3 since the Construct Team is putting all of their efforts into C3 engine.
Play Ball Walker App Store | Google Play | Amazon
Image
B
46
S
9
Posts: 195
Reputation: 3,137

Post » Sat May 19, 2018 1:07 am

Hey bro, i bought C3, and i`m fine with this xD

i`l trying to add google play services to C3 now,
i`l post if it works.. thx for help

KENYONB wrote:@camboriu Construct # will eventually be able to build signed APKs. But for right now, you can build an Android Studio Project, open in Android Studio, then build a signed APK from that.

Also, all this time i thought you were referring to issues with Google Play Game services for Construct 3, but you're talking about Construct 2? I haven't bothered with the plugin in C2, only C3. Trying to move everything to C3 since the Construct Team is putting all of their efforts into C3 engine.
B
3
Posts: 8
Reputation: 193

Post » Sat May 19, 2018 2:45 am

Message: camboriu can only post plain text URLS until they have 500 rep. 4 URLS modified. Why?
i have your first issue with google play..
i`l post images..
1 http://prntscr.com/jjsa6m
2http://prntscr.com/jjsagd
3http://prntscr.com/jjsajh

After this, dont happens nothing...
i create a BUtton to signin, however when i press the button, nothing happens too.
This is part of my code...
can you help me, please?
http://prntscr.com/jjsb7a


camboriu wrote:Hey bro, i bought C3, and i`m fine with this xD

i`l trying to add google play services to C3 now,
i`l post if it works.. thx for help

KENYONB wrote:@camboriu Construct # will eventually be able to build signed APKs. But for right now, you can build an Android Studio Project, open in Android Studio, then build a signed APK from that.

Also, all this time i thought you were referring to issues with Google Play Game services for Construct 3, but you're talking about Construct 2? I haven't bothered with the plugin in C2, only C3. Trying to move everything to C3 since the Construct Team is putting all of their efforts into C3 engine.
B
3
Posts: 8
Reputation: 193

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests