Keda 0 Posted December 27, 2019 Hello everyone. I am happy to see that the delphi community is alive! I love delphi and when I wanted to write a game I was told Unity is the way to go. So I wrote a game in unity but I hate it. I would like to make a game in Delphi. However, I hit a snag... I can't find information online on about how can I save progress and use leaderboards using google play services. On Unity it was pretty easy, but like I have said, I can't stand C# and Unity its not human friendly. At least not to my taste. Can anyone please help me with a short tutorial or some sample code? I would greatly appreciate it. Thank you. Share this post Link to post
Dave Nottage 557 Posted December 28, 2019 12 hours ago, Keda said: However, I hit a snag... I can't find information online on about how can I save progress and use leaderboards using google play services. On Unity it was pretty easy, but like I have said, I can't stand C# and Unity its not human friendly. At least not to my taste. Unless someone has done it already, I expect you're going to need to spend a fair amount of time on it. This is a starting point for the leaderboard/game saving parts: https://developers.google.com/games/services/android/leaderboards It would be a case of: Reading the documentation, and working out which parts you want to implement Working out which packages the relevant classes are in Doing imports of those classes into Delphi code Working out whether there are any classes you need to create descendants for, and writing the appropriate Java and associated Delphi code for them Implementing the various parts in Delphi Alternatively, you could implement a large portion of it in Java, create a .jar that Delphi would use and import the relevant parts into Delphi code. I note that it requires Google Sign-in, so for that part you might want to take a look at this: https://github.com/grijjy/DelphiGoogleSignIn Which is related to Firebase, however the Google Sign-In parts would be relevant. 1 Share this post Link to post
Yaron 53 Posted January 7, 2020 I was facing a similar issue with leaderboards and for cross-compatibility, decided to write a very simple back-end server of my own to maintain the leaderboard: Wrote it in Delphi+MARS and you can find it here: https://github.com/bLightZP/marsGameServices Share this post Link to post
Keda 0 Posted January 7, 2020 Thank you so much for your replies guys. @Yaron, thank you. But I am looking for a solution on Google Play leaderboards. I do not own a server or anything like that. I would like to use google platform. It supports saving game progress and what not. People are used to it. Thank you all again! Share this post Link to post
Yaron 53 Posted January 9, 2020 There's this article:http://www.fmxexpress.com/leaderboards-and-achievements-with-google-play-game-services-in-delphi-xe5-xe6-xe7-firemonkey-on-android/ It's a bit outdated, but perhaps it would help. Share this post Link to post