[SOLVED]How to make Leaderboard using Google Spreadsheet?


#1

I want to Post playerName and Score when game over. Also I want 10 top scores to show on the leaderboard.
Please help me implement, I am a newbie :frowning:


#2

There is a tutorial for Construct 2 that explain how to send data to google spreadsheet so I think it’s possible to do it with Gdevelop using the network commands to send the data to it.

This is the tutorial page: https://www.construct.net/en/tutorials/sending-data-from-construct-23-to-google-spreadsheet-1447

There a video about is also but isn’t in english so the best thing is to view it carefully and adapt it to Gdevelop:


#3

Same newbie here.
If your game can go online, I suggest that you can try http://dreamlo.com/ ,it would save you a lot of time~


#4

Many many thanks guys, Now I can post data to spreadsheet and get… But here is the new problem as I am newbie. How can I parse JSON :
{“result”: “success”, “sheet”: [“Epsilon1”, 10000], [“Epsilon”, 10000], [“EEE”, 200], [“kkk”, 77], [“fdfs”, 40], [“qq”, 30]}
As these data consists of Player Names and Scores. how can separately put it on different variable and show them in LeaderBoard like below.


#5

As GDevelop doesn’t have arrays yet, you need to use the structure variables, as explained here.
For instance: HighScore.Name.8 would return “Epsilon” and HighScore.Score.8 would return 2000.


#6

Thank you, with little tweaks I am able to grab the array elements :blush:


#7

Anyone have tried if this works with GD? Please let me know and maybe some guide if possible.


#8

I also want to know this.

@Epsilon Do you have it working? Can you maybe post your project with only the leaderboard, as an example?


#9

You mean dreamlo.com ? It did work with GD. :wink: :wink: :wink:


#10

Yes, thanks man. I got it working and its the easiest solution for an online leaderboard for me this time.


#11

That’s great! :wink:

But be careful about the HTTPS problem when you put the files on the web, some web server do not allow non-https request~


#12

I was on holiday, sorry, couldn’t reply. If you still need help please let me know.