State of the Google Play Plugin

0 favourites
From the Asset Store
Google Analytics 4 Plugin for Construct 3 enables metrics and analytics for your games easily.
  • >

    > Wow, great job! I couldn't get any scores to submit or leaderboards to show yesterday. And one Google Play event/trigger is crashing my game.

    >

    > Would you mind taking a screen capture of your events to submit score and display leaderboard? Or copy and paste as text? That would be helpful. Or PM me.

    >

    Still need help?

    Thanks for checking in I was able to set score and display leaderboard last night. So I'm making progress.

    Next, I am trying to figure out how to do the following:

    -Load the player's own high score

    -if high score (loaded above) is greater than global variable "GooglePlayHighScore", replace value in global variable variable

    -set a text field to global variable "GooglePlayHighScore"

    I've been able to do this using the Facebook Instant Games plugin, so I imagine it is possible with Google Play services, I just need to figure out the right order of events/triggers. I was trying to do this at the same time I was trying to set score and then display leaderboard, but something was crashing the game.

  • > It's not an issue with the order of events. The sign-in basically fails. As a test I placed an -> on auto-sign in failed-sign-in event on the title page of my game and it is a continuously repeating instance of how you describe it: a dimming of the screen and the notification bar coming visible but nothing happening. Thus, it has to do with the setup of the google play plugin not the order of events.

    >

    Well, I got the auto-sign in to work! It loads the sign in screen with my avatar and confirms sign in like other games.

    I left my order of events as they are in my previous post above. I have App ID and Game ID and Client ID entered, so not sure if that makes a difference having all 3 entered. And I also signed the APK with both V1 and V2 this time, so not sure if that made the difference.

    I now have two remaining issues...

    1- Loading the player's best high score and saving as global variable to set in text field. It's always stuck at 0.

    2- And Display Leaderboards. When you click the icon to show leaderboard, a screen loads but the load circle just goes around and around.

    Still testing. So I'll report back if I get these to work.

    What exactly did you put for App ID, Game ID and Client ID?

  • I've managed to get a working achievements and leaderboard but the actual values aren't correct, perhaps due to a lack of "trigger once while true" conditions.

    Essentially I set it up as If (is boolean set)-> unlock achievement/submit score

    Then I go into my game services and locate the corresponding ID for the intended achievement/score and insert that into the action.

    Could you please post a SS of this?

  • >

    > > It's not an issue with the order of events. The sign-in basically fails. As a test I placed an -> on auto-sign in failed-sign-in event on the title page of my game and it is a continuously repeating instance of how you describe it: a dimming of the screen and the notification bar coming visible but nothing happening. Thus, it has to do with the setup of the google play plugin not the order of events.

    > >

    >

    > Well, I got the auto-sign in to work! It loads the sign in screen with my avatar and confirms sign in like other games.

    >

    > I left my order of events as they are in my previous post above. I have App ID and Game ID and Client ID entered, so not sure if that makes a difference having all 3 entered. And I also signed the APK with both V1 and V2 this time, so not sure if that made the difference.

    >

    > I now have two remaining issues...

    >

    > 1- Loading the player's best high score and saving as global variable to set in text field. It's always stuck at 0.

    >

    > 2- And Display Leaderboards. When you click the icon to show leaderboard, a screen loads but the load circle just goes around and around.

    >

    > Still testing. So I'll report back if I get these to work.

    >

    What exactly did you put for App ID, Game ID and Client ID?

    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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • >

    > 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.

  • >

    > >

    > > 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.

  • 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.

  • 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)

  • 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

  • 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?

  • 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

    > 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?

  • 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.

  • 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

    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.

  • i have your first issue with google play..

    i`l post images..

    1 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?

    prntscr.com/jjsb7a

    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

    > 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.

    >

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)