Тёмный

Adding Google Play Leaderboards in Godot! 

Ozzadar Dev
Подписаться 2,6 тыс.
Просмотров 3,9 тыс.
50% 1

In this tutorial, I'll show you how to quickly and easily add Google Play Leaderboards to your Godot projects.
Google Play Godot Plugin: github.com/mauville-technolog...
Included:
- Submit score to Google Play
- Display built-in leaderboards screen
- Query player's rank and hiscore to display in game
This lesson builds on what was covered in Godot Google Play Services on Android in 30 Minutes! • Godot Google Play Serv...
Join me next time where we add achievements to our Android project.
Chapters:
0:00 Introduction
1:00 Repository
2:50 Project Structure (Overview)
4:12 Google Play Console Setup (Leaderboard creation)
6:00 Open Builtin Leaderboard View
9:10 Submit High Scores to Leaderboard
11:35 Retrieve Existing High score and Rank on Startup
17:43 Retrieve New Rank + High Score after score submission

Наука

Опубликовано:

 

1 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@pablogri4667
@pablogri4667 2 года назад
Wow This is gold! Great tutorial!! There is not much information about godot and playservices on the web. Thanks a lot!! Regards from Argentina
@OzzadarDev
@OzzadarDev 2 года назад
Thanks and no problem ^.^
@Destroyer19941995
@Destroyer19941995 3 года назад
Thank you very much.
@OzzadarDev
@OzzadarDev 3 года назад
No problem! Glad I could help :)
@vikramthewrench
@vikramthewrench 3 года назад
Thank you so much ❤️✌️😁
@OzzadarDev
@OzzadarDev 3 года назад
No problem! More to come =)
@NgaeGameStudio
@NgaeGameStudio 2 года назад
Good job mate
@OzzadarDev
@OzzadarDev 2 года назад
Thanks :)
@maximilianschon1503
@maximilianschon1503 3 года назад
I love that you forked the repo, it was so disappointing that no one else had a working release for the current Godot's stable version! Is there a C# implementation though? I'd like to switch languages nearly.
@OzzadarDev
@OzzadarDev 3 года назад
Im not entirely sure how android plugins interact with the C# system but nothing leads me to believe that this current plugin won't interact with C# properly (the typing might be an issue. I cant find any resources on how one would normally interact with an android plugin through c# scripting). I expect we would need to provide a .cs file or something within the plugin. If someone can figure it out how android plugins godot normally talk to each other, id be more than happy to try and build the interface to provide it alongside it.
@TheRonpe
@TheRonpe 2 года назад
I haven't watched this video yet (planning to do so later), so I don't know if you mention this BUT what is the Android emulator that you're using to test your game? I've been using Genymotion myself. Always interested in alternatives.
@OzzadarDev
@OzzadarDev 2 года назад
The built in android simulator is what I use if I need to test stuff but if that doesnt work (like has been happening recently) I just use my own phones.
@TheRonpe
@TheRonpe 2 года назад
@@OzzadarDev Ah, I tried androids own emulator but there was issues with AMD processors back then so I ditched it.
@real_rumin
@real_rumin 2 года назад
Such nice video. But I am stuck ! I want to display the high score of the user from the Play Services data base. I'm not able to do that. Also I am getting confused since I am fairly new
@OzzadarDev
@OzzadarDev 2 года назад
Sorry for the delay. I'm unsure what you're stuck on and where you're having the problem. It's easier to help debug stuff here: discord.gg/FrNq3Wyr You can hop on an explain where you're stuck in more detail. There's some others there who could help as well
@user-xf6ps1zn5r
@user-xf6ps1zn5r 2 года назад
Hi! I've got "Sign in failed 4". What's wrong?
@OzzadarDev
@OzzadarDev 2 года назад
Error code 4 is usually an issue with your SHA settings. Double check your Oauth consent form and credentials in google play/console
@SpyrosSolda
@SpyrosSolda 3 года назад
Hi, I think _on_leaderboard_score_retrieved should also return the leaderboard_id because if you have many leaderboards you won't know to what leaderboard the returned score belongs.
@OzzadarDev
@OzzadarDev 3 года назад
Hey, you're right. I should probably go back and add that. I didnt think of wanting to have multiple leaderboard score retrievals in flight at the same time. Though in theory this could enforce a better design where you're not making a bunch of calls to the API. If you make too many calls at the same time google will start throttling you. Not too hard to add though and follows the conventions set with the other api calls. Thanks
@SpyrosSolda
@SpyrosSolda 3 года назад
@@OzzadarDev Also I noticed that retrieveLeaderboardScore does not return the current users score but the highest score of the leaderboard. I tried with 2 different users and I always got the player with the highest score
@OzzadarDev
@OzzadarDev 3 года назад
@@SpyrosSolda ... Thats definitely odd. Ill have to look into it further. The API was weird and the way I had to put it in was a little hacky.
@samirsuleymanov2099
@samirsuleymanov2099 3 года назад
Thank you for the explanation! But I got a problem. I got it right, exported apk and installed it directly to my phone, it signed in, submitted score to the leaderboard and showed it perfectly well. But when I publish the very same apk at Play Store and download it from the Play Store, the Google Play cannot connect, or sign in. Circling download sign appears for a few seconds, then disappears, nothing happens. Obviously cannot access leaderboard too. Any idea why when I install the apk directly from my desktop the Google Play works well, but if I install it from the Play Store, it does not?
@OzzadarDev
@OzzadarDev 3 года назад
When you upload it through the play store, google will automatically resign your package with a secure key generated by google. You need to make sure to create a second set of OAUTH credentials for this new SHA1 key. You can find it in the playconsole on the left by going Setup->App Integrity. It can take some time for the servers to get updated for this new set of credentials so if you apply it wait a little bit and it should start working
@samirsuleymanov2099
@samirsuleymanov2099 3 года назад
@@OzzadarDev Worked like a charm! Much appreciated!
@OzzadarDev
@OzzadarDev 3 года назад
@@samirsuleymanov2099 excellent!
@samirsuleymanov2099
@samirsuleymanov2099 3 года назад
@@OzzadarDev Is there a way for Leaderboard to display "Score" as "Lap Time"? The numbers (value) are good, but the string "Score" would better go as "Lap Time" as it's a racing game. Thank you!
@OzzadarDev
@OzzadarDev 3 года назад
@@samirsuleymanov2099 At least for leaderboards, I you can click a 'include custom units' checkbox and you can rename the units to whatever you want. In my case, I called it 'bonks'. That may be the best you can do
@Daniel-su8yr
@Daniel-su8yr 2 года назад
Does this plugin work on version 3.3.3? I'm getting error 10 when trying to login.
@OzzadarDev
@OzzadarDev 2 года назад
Yes it does. I recently remade the plugin setup guide where I used 3.3.3 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-f--pe75splM.html hope that helps
@Daniel-su8yr
@Daniel-su8yr 2 года назад
@@OzzadarDev Thanks for the reply, I had done everything as in the video (the new one) and in the end error 10 is always returned.
@OzzadarDev
@OzzadarDev 2 года назад
@@Daniel-su8yr ive never seen error 10. A quick google search tells me it has something to do with the configuration on the Google Play Console side of things. Double check your appId, SHA1 keys, package name, etc. Error 10 is a generic "developer error" indicating something is misconfigured.
@Daniel-su8yr
@Daniel-su8yr 2 года назад
@@OzzadarDev Hi! I managed to solve it, apparently it was a conflict issue between the Play Games ID and the AdMob ID. Thank you very much for the video!
@OzzadarDev
@OzzadarDev 2 года назад
@@Daniel-su8yr im glad! no problem :)
@stevemcwin
@stevemcwin 2 года назад
Hey, thanks for uploading these tutorials, but I'm having issues with the leaderboard. When I try to show the scores, they just won't load. The little wheel thingy just keeps spinning. Thanks to the _on_leaderboard_score_submitted function I know that the score is being submitted to the leaderboard, but on the google console website's leaderboard tab the little "Scores" field is empty (not sure if that means that the score is not being submitted after all). Oh and I guess I should note that the signing in works as intended and that I can see my account icon in the top right corner of the leaderboard.
@brynjarbjarkason7506
@brynjarbjarkason7506 2 года назад
i am having the same problem, did you find a soulution?
@stevemcwin
@stevemcwin 2 года назад
@@brynjarbjarkason7506 yes I have actually. The way I fixed it was that I created a web client in the cloud console credentials tab. I don't really remember if that was all there was to it but even if that doesn't fix I still have good news for you. I've found out that if you publish the leaderboard even without the web client it will work as intended, but you lose the options of reseting the score and changing some of the features, so you'd have to make a new leaderboard if you want to reset data or change something.
@brynjarbjarkason7506
@brynjarbjarkason7506 2 года назад
@@stevemcwin Ok good news, thank you very much
@mani12347
@mani12347 2 года назад
Bro this google play leaderboard is free for lifetime please answer this question
@OzzadarDev
@OzzadarDev 2 года назад
after the ~25$ to activate your developer account; the google play services are free. Whether it'll stay free is up to Google but I imagine it will
@dotsooin
@dotsooin 2 года назад
Thanks for you Can I know the total number of users additionally? score_dictionary["score"] score_dictionary["rank"] score_dictionary[" ??? ]
@OzzadarDev
@OzzadarDev 2 года назад
Hi, I'm sorry I don't understand the question. Currently the score returned by that function only contains the current user. An additional function could be added to the plugin to get more users but it's not there yet
Далее
Add Android Achievements in Godot!
27:14
Просмотров 1,4 тыс.
How to Set Up Google Play Leaderboards in Unity!
9:47
Godot 3.3 Google Play Services and Android Exports
57:35
3 services for online leaderboards in Godot
7:12
Просмотров 3,9 тыс.
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 821 тыс.
Do THIS Before You Publish Your Godot Game
3:33
Просмотров 156 тыс.
Battery  low 🔋 🪫
0:10
Просмотров 13 млн
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 6 млн
iPhone socket cleaning #Fixit
0:30
Просмотров 17 млн