Leaderboard - Game Center/Google Play...

1 favourites
From the Asset Store
Google Analytics 4 Plugin for Construct 3 enables metrics and analytics for your games easily.
  • Hello all - I'm wanting to include a leaderboard or Game Center(iOS)/Google Play (android) functionality in my game, although I'm not sure which, or if a leaderboard is a Game Center/Google Play.

    Essentially I do want a leaderboard - so do I go about this via implementing Game Center/Google Play or do I do it another way? I want the user to be able to click the highscore icon and to be taken to a leaderboard if they're signed into Game Center/Google Play. Is this doable?

    I've looked up the Game Center manual entry (https://www.construct.net/gb/make-games/manuals/construct-3/plugin-reference/game-center) but it doesn't show how to implement the functionality, just lists the possible actions, conditions and expressions etc.

    So is it Game Center/Google Pay functionality that I do need or is it something else? Also, can someone point me towards a Construct tutorial that shows me how I go about implementing this functionality?

    Thanks all

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OK - what I've done to start with is:

    System > On Start of layout > GameCenter > Authenticate user

    ...then further down:

    So where do I go from here - I'm guessing I have to redirect or send info to Game Center once Scoreboard has been touched. In the final action - I'm guessing leaderboard is something I set up with Apple and it's ID will be entered here?

  • OK - I've managed to set up a Game Center Leaderboard etc and I now have the following that adds highscores:

    The highscore adds to the leaderboard, however it doesn't add automatically - If I first get a highscore of (for example) 10 and add that to the leaderboard thats fine. However, if I then get a highscore of 15 and add that, the leaderboard doesn't update, unless I go out of the leaderboard and then go back into it - where it's then updated.

    Is there a way to get the leaderboard to update directly on Highscore submit, rather than having to go out then in again?

  • Google Play Services (Android) and Game Center (Apple) are different/separate.

    Refer to Google Play Game services setup instructions here:

    https://www.construct.net/make-games/ma ... oogle-play

    and Game Center setup instruction here:

    https://www.construct.net/make-games/ma ... ame-center

  • Yeah - I'm mixing the two up. I've sorted the Apple Game Center leaderboards - It's the Google Play Services leaderboard I'm trying to implement for Android.

    I've got the Google Play Console and have created an application in the All Applications tab.

    In the Game Services tab I've added a new game and created a Leaderboard.

    It says the next step is for me to link an app.

    When I click Link App icon I get a series of icons (Android, iOS, Web, Chrome, Other Platform) - I choose Android and it asks me for a package name - this is where I'm up to and where I'm stuck.

    Can you help here?

  • When I click Link App icon I get a series of icons (Android, iOS, Web, Chrome, Other Platform) - I choose Android and it asks me for a package name - this is where I'm up to and where I'm stuck.

    You need to have created a App to link the Game Services to. (as they are two separate things). Have you already created the app in the "All Applications" section, and I think you also would have to upload an initial APK there too.

  • The only place I seem to be able to upload an APK is via the All Applications tab then select the Application then App releases tab then I get a list of Production, Beta, Alpha, Internal Test - in each of these I can select Manage then Create Release and upload an APK there.

    Is this the correct place to upload an APK? Which do I select?

  • Yeah, that's the place. I always upload to Alpha, then assign myself as a tester (closed testing).

    I never noticed "Internal test", but should work there

  • OK - I've added the apk to Internal Test - what now?

  • Like you said, in the Games Services, you need to link the app where it asked you for the package name "com.yourcompany.gamename".

    If your game is still not showing up, try uploading it as an Alpha release. Uploading a signed APK will set the package name for you (the one you wrote in C3.

  • OK - linked the app.

    Have been given several long strings - perhaps signing keys etc?

    Where do I put these? Somewhere in my app, then re-export?

  • You'll need to input the Application ID and Client ID into the GooglePlay plugin properties.

    And obviously also use the leaderboard ID you created when submitting scores, and loading the highscores.

  • OK - so I put in the App and Client IDs in the Google Play plugin.

    My code to sign in and upload the highscore to the leaderboard looks like this:

    This signs in to the Google Play service - but then doesn't (seem to) do anything else - ie it doesn't display the leaderboard on my phone. I thought Sign up > Submit > Display would work fine here. What am I missing?

  • Do 'sign in' on start layout event.

    Submit score separately (separate action).

    Display leaderboard when button pressed.

  • Well one thing I don't want to do is log the user in or request a sign in unless they specifically press the leaderboard button.

    So I need a process where the authentication/sign in and upload score and display leaderboard is handled with a single button press.

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