GDquest has started a new kickstarter campaign to create a professional tutorial for Godot, focused on 2d games.
"Learn to create 2d games with the award-winning, Open Source engine Godot 3. Free daily tutorials on Youtube during the campaign!" "You will learn to create your own top-down game inspired by Zelda"

Google Play Services Module for Godot 2.0++

1000parsecs1000parsecs Posts: 8Member
edited September 2016 in Resources
UPDATED: 11 July 2016
- more readable instructions

GitHub repo: https://github.com/ranmaru90/Play-Game-Services-Android-Module-for-Godot

Note that this is for the actual Google Play Services, not AdMob. Has achievements and leaderboards.

Originally forked from Blubee's and refactored / changed. Also added leaderboards. Might add more features when I have a lot of time to relax.

Tags :

Comments

  • anyoneianyonei Posts: 7Member
    i was trying to use this module
    it looks like user signs in correctly without any problems
    but when i try to show a leaderboard or achievements simply nothing happens
    any idea how to solve this
    Tx.
  • 1000parsecs1000parsecs Posts: 8Member
    [color=rgb(51, 51, 51)]Hmm, make sure you have at least one leaderboard and one achievement created in your Developer's Console. You followed all the instructions on the GitHub page, right? [/color]


    Also, you must sign in first before leaderboards and achievements can be shown.
  • anyoneianyonei Posts: 7Member
    yep , did everything as said in github page
    and in developer console did everything even its in publish state

    i init like this
    Code:
    func _init():
    print(get_instance_ID())
    if Globals.has_singleton("PlayGameServices"):

    PlayGameServices = Globals.get_singleton("PlayGameServices")
    PlayGameServices.init(get_instance_ID())
    PlayGameServices.sign_in()
    and try to show achievements like this
    Code:
    func showach():
    if PlayGameServices:
    PlayGameServices.achievement_show_list()
    maybe im missing smt?
  • 1000parsecs1000parsecs Posts: 8Member
    Try to sign_in() in _ready() instead, or put it on a button.


    and


    Code:
    func showach():   
        if PlayGameServices:     
            PlayGameServices.achievement_show_list()


    should be:


    Code:

    func showach(): 
       if Globals.has_singleton("PlayGameServices"):
            PlayGameServices.achievement_show_list()




    assuming PlayGameSerivces has been declared somewhere:

    Code:
    var PlayGameServices

    and like in your _init(), already let it get_singleton("PlayGameServices")


    Posting something formatted in this forum is such a ****ing pain.
  • anyoneianyonei Posts: 7Member
    lol Smiley
    tx for replys but nothing works
    i ll try to reset everything and start again
    ill post if i find anything Smiley
  • 1000parsecs1000parsecs Posts: 8Member
    Can you post your logcat of when you try to open the achievements list?
  • anyoneianyonei Posts: 7Member
    i found the problem dude  Smiley
    somehow Google Drive API was disabled when i reenabled it. It worked
  • 1000parsecs1000parsecs Posts: 8Member
    Haha. I wrote about that in the last 3 paragraphs of the README.md. Great to know it's working. However, if you update your Android SDK to the latest, you might get java.lang.RuntimeException: Unable to get provider com.google.firebase.provider due to the API being changed to use Firebase for some stuff.
  • ArnavArnav Posts: 2Member

    Hi! I also have this problem. I have done everything in the README and done enabled the Drive API. in the log it says something about not specifying the view for the popup? I am just trying to get achievments to unlock and show the list but nothing happens. Please help me! Thanks

  • PupolajshuPupolajshu Posts: 7Member

    Hi, I am not sure if you will read this, but I it seems that sign_in() function fails... I mean, I cannot log in, it shows the signing in pop-up but then it disappears.
    Yes, I have enabled apks, compiled and stuff... I did everything you did

Sign In or Register to comment.