Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
leaderboards google game service: 'timeScope' must be one of the accepted values — Gideros Forum

leaderboards google game service: 'timeScope' must be one of the accepted values

piepie Member
edited November 2015 in General questions
Hi,
I am trying game services plugin, I saw the reference doc inside the plugin directory but I am missing some info.
For example in
googleplay:loadScores(leaderboardId [,timespan, participants, maxResults]) 
--retrieve all scores for specific leaderboard in a specific timespan for specific participans
How do I use the optional values? Is there some more information around?
Thank you :)

Comments

  • From https://github.com/gideros/gideros/blob/master/plugins/googleplay/reference.html

    You have timespans as:
    • GooglePlay.ALL_TIME --leaderboard timespan all time
    • GooglePlay.WEEK --leaderboard timespan week
    • GooglePlay.TODAY --leaderboard timespan today
    and participants:
    • GooglePlay.FRIENDS --leaderboard participants
    • GooglePlay.ALL_PLAYERS --leaderboard participants
    Don't they work?
  • Sorry for the late reply,
    It seems that they are working, at least to a certain extent: I believe it's me doing something wrong.
    googleplay:loadScores(leaderboard_Id ,GooglePlay.ALL_TIME, GooglePlay.ALL_PLAYERS, 10)
    I have only my score recorded on the leaderboard.
    (it is there if I use googleplay:showLeaderboard("leaderboard_id"), but it doesn't show in the event.score table from LOAD_SCORES_COMPLETE.

    Other "readable" information in LOAD_SCORES_COMPLETE event like leaderboard id or name seems to be ok.


    I don't get anything either with
    googleplay:getPlayerScore("leaderboard_id")
    How do I retrieve my score from a specific leaderboard?


    Thank you :)

  • I think googleplay:loadScores should do the job.

    BTW if you are just starting, I would recommend using GamingInterface instead.
    It also supports google play, but also amazon circle and ios stuff with same interface,
    and I think google play part there is newer then in separate googleplay plugin

    https://github.com/gideros/gideros/tree/master/plugins/gaming
  • Thank you, I choose google play because I was interested in multiplayer support and eventually cloud saves without running a dedicated server.

    I didn't know that it was not updated, i will think about switching to gamingInterface - I'd like to try to save my last days work :) however googleplay looks great, it's a pity to lose those features.

    Unfortunately I don't get scores with loadScores - just an empty table. Maybe I can live without it if it's the only issue.
    Am I the only one using google play services? :D

    thank you

  • SinisterSoftSinisterSoft Maintainer
    edited November 2016
    @ar2rsawseen The gaming library seems to have been updated using code from the GooglePlay lib, but the loadScores function now crashes Gideros.

    This only happens if a score has been submitted, if no scores are present then no crash.

    logcat:

    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] JNI DETECTED ERROR IN APPLICATION: GetStringUTFChars received NULL jstring
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] in call to GetStringUTFChars
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] from void com.giderosmobile.android.plugins.gaming.Game.onLoadScoresComplete(java.lang.String, java.lang.String, java.lang.String, java.lang.Object, long)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] "main" prio=5 tid=1 Runnable
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] | group="main" sCount=0 dsCount=0 obj=0x74826fa0 self=0xb730f9a0
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] | sysTid=13424 nice=0 cgrp=default sched=0/0 handle=0xb6f7bb34
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] | state=R schedstat=( 0 0 0 ) utm=31 stm=22 core=1 HZ=100
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] | stack=0xbe1e4000-0xbe1e6000 stackSize=8MB
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] | held mutexes= "mutator lock"(shared held)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #00 pc 00373de1 /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream >&, int, char const*, art::ArtMethod*, void*)+168)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #01 pc 00353457 /system/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream >&) const+150)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #02 pc 0025d57d /system/lib/libart.so (art::JavaVMExt::JniAbort(char const*, char const*)+732)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #03 pc 0025dc55 /system/lib/libart.so (art::JavaVMExt::JniAbortV(char const*, char const*, std::__va_list)+64)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #04 pc 000fd751 /system/lib/libart.so (art::ScopedCheck::AbortF(char const*, ...)+32)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #05 pc 00103049 /system/lib/libart.so (art::ScopedCheck::Check(art::ScopedObjectAccess&, bool, char const*, art::JniValueType*) (.constprop.96)+2708)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #06 pc 0010be49 /system/lib/libart.so (art::CheckJNI::GetStringUTFChars(_JNIEnv*, _jstring*, unsigned char*)+412)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #07 pc 0000a9d4 /data/app/com.sinistersoft.dungeons-2/lib/arm/libgaming.so (GGame::map2score(_jobject*)+1496)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #08 pc 0000ae3c /data/app/com.sinistersoft.dungeons-2/lib/arm/libgaming.so (GGame::onLoadScoresComplete(_jstring*, _jstring*, _jstring*, _jobject*)+44)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #09 pc 0022072f /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.giderosmobile.android.plugins.gaming.Game.onLoadScoresComplete(java.lang.String, java.lang.String, java.lang.String, java.lang.Object, long)+186)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #10 pc 0021f911 /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.giderosmobile.android.plugins.gaming.Game.loadScoresComplete(java.lang.Object, java.lang.String, java.lang.String, java.lang.Object)+284)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #11 pc 0074ee9d /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.giderosmobile.android.plugins.gaming.frameworks.GameGoogleplay$5.onResult(com.google.android.gms.games.leaderboard.Leaderboards$LoadScoresResult)+448)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #12 pc 0074ec91 /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.giderosmobile.android.plugins.gaming.frameworks.GameGoogleplay$5.onResult(com.google.android.gms.common.api.Result)+92)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #13 pc 002ea5ff /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.google.android.gms.common.api.zzb$zza.zzb(com.google.android.gms.common.api.ResultCallback, com.google.android.gms.common.api.Result)+58)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #14 pc 002ea2cb /data/app/com.sinistersoft.dungeons-2/oat/arm/base.odex (void com.google.android.gms.common.api.zzb$zza.handleMessage(android.os.Message)+350)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] native: #15 pc 007b6895 /system/framework/arm/boot.oat (???)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.giderosmobile.android.plugins.gaming.Game.onLoadScoresComplete(Native method)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.giderosmobile.android.plugins.gaming.Game.loadScoresComplete(Game.java:340)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.giderosmobile.android.plugins.gaming.frameworks.GameGoogleplay$5.onResult(GameGoogleplay.java:317)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.giderosmobile.android.plugins.gaming.frameworks.GameGoogleplay$5.onResult(GameGoogleplay.java:1)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.google.android.gms.common.api.zzb$zza.zzb(unavailable:-1)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.google.android.gms.common.api.zzb$zza.handleMessage(unavailable:-1)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at android.os.Handler.dispatchMessage(Handler.java:102)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at android.os.Looper.loop(Looper.java:168)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at android.app.ActivityThread.main(ActivityThread.java:5845)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at java.lang.reflect.Method.invoke!(Native method)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
    11-26 22:04:25.653: A/art(13424): art/runtime/java_vm_ext.cc:448]
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • It would be cool to have a full featured and updated google play services plugin.
    Is someone able to do it?
    Maybe it can be pushed through a kickstarter.. I would back it :)
  • SinisterSoftSinisterSoft Maintainer
    edited November 2016
    I would too, don't forget play also includes iab.

    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • How about making these plugin-ins community maintained? We just need updated documentation / a plug-in 101 tutorial. I'd be willing to pay for that. This would free up the core team to work on features / improvements.

    We have invested a huge amount of time and energy into Gideros. We are ready to roll up our sleeves and get our hands dirty. We will be able to potentially cover iOS and Android.

    +1 -1 (+5 / -0 )Share on Facebook
  • I agree, the core plugins have to be maintained. If they're not, the new awesome features are overshadowed by issues when it comes to releasing and monetising the game.

    The question is: Who can do it? Maybe there are capable developers out there that don't want to do it because it's open source? I would pay solely to avoid having to spend time troubleshooting plugins at the end of each project, rather than for new features.

    Gideros is amazing right now, just as it is. But the plugins are getting all the attention (for completely valid reasons).

    Let's come up with a game plan to solve this!
    My Gideros games: www.totebo.com
    +1 -1 (+4 / -0 )Share on Facebook
  • simwhisimwhi Member
    edited November 2016
    @totebo

    I'm not sure who can do it right now either, but we are willing to give it a try. It is our interest to do so now. We have already invested a great deal of time in using Gideros, and we have no intention of changing that.

    I think we all need to get a better understanding of how it all works. So, what to do?

    Firstly, I think we need a step-by-step tutorial with:

    1) Setup instructions - What compiler / tools / SDKs do we need (Windows and OSX)
    2) A real world example that demonstrates how Lua communicates / binds to java or
    Object-C

    This would give us a way to dissect what is going on under the hood.

    A final thought. Is it possible to simplify plugin development by utilizing other more modern methods?

    Edit: Would something like this work with Gideros: https://github.com/ThePhD/sol2
Sign In or Register to comment.