Hi there! I love your tool, I used it for a couple of jams and it is very easy to implement <3 I referenced you in my itch page.
I only have one question, I'm using v2.8 since may 2024. But there are everyday several periods of 20-40min where the leaderbords won't respond, always from 21.00-22.00 CET, even trying to open them from here (leaderboard-creator) it says "Internal server error". Is it a known issue that you are fixing on the 3.0 or do you know that this is happening?
I mean it is free so no problem, and I also managed those cases from the games, so you can play them without leaderboard, but it's a pitty when some player tells me that couldn't open the game :(
In leaderboard we can upload user's Names but isn't there anyway to upload user's profile pics I mean I saw a variable named Extra but when send my string (basically a base64 string converted from a sprite) but the problem is that the characters of that string are more than 700 but the allowed amount of characters of that Extra variable is 100 I have tried reducing the quality of that sprite and convert it to jpeg instead of png but still the characters are more than 100 What should I do in this case any ideas?
You should not be storing the full sprite in string, you should create some kind of ID for a sprite in a scriptableObject or something and save that in the extras. I created a little class that helps me store data in a single string in a KvP way, hope it helps:
public class SingleStringKvP
{
private readonly Dictionary<string, string> _kvPairs = new();
private const char PairSeparator = ';';
private const char KeyValueSeparator = ':';
public SingleStringKvP(string startingValue)
{
Parse(startingValue);
}
public SingleStringKvP()
{
}
public void AddValue(string key, string value)
{
_kvPairs[key] = value;
}
public string GetValue(string key)
{
return _kvPairs.TryGetValue(key, out var value) ? value : string.Empty;
}
public override string ToString()
{
var builder = new StringBuilder();
foreach (var kvp in _kvPairs)
{
if (builder.Length > 0)
builder.Append(PairSeparator);
builder.Append($"{kvp.Key}{KeyValueSeparator}{kvp.Value}");
}
return builder.ToString();
}
private void Parse(string startingValue)
{
if (string.IsNullOrEmpty(startingValue)) return;
var pairs = startingValue.Split(PairSeparator);
foreach (var pair in pairs)
{
var kv = pair.Split(KeyValueSeparator);
if (kv.Length == 2)
{
var key = kv[0];
var value = kv[1];
AddValue(key, value);
}
}
}
}
I didn't find tutorials online, so I decided to make one. Here you can find the gist: Simple leaderboard in Godot
I will be working on the devlog soon, please let me know in the comments for gist what you want to see in it :)
Also, if you want to secure your leaderboard in Unity to verify that the entries are coming from the game itself and not from POST requests, I've made a devlog describing exactly that:
Hey, great plugin! I recently published my game, which uses this plugin, and some of my players encountered an issue where their new high scores are not available on the leaderboard. I'm asking here because I read the documentation and couldn't find anything about this. Here is my code :
Very nice plugin. I have a problem though, I ticked "ascending order" by accident and now my leaderboard is reversed and I don't know how to get it back in a descending order. Can someone help me ?
Yes, you have to click on "Ascending order" again. It is a toggleable checkbox. Once you click it, a green text will appear "Sorting order has been updated successfully!", and the checkbox is unchecked like it used to be.
Thank you so much for your tool. I have additional questions that are not outlined in the docs:
1. How many scores can be submitted to the board in total?
2. When the max submittable scores are reached, what happens when you submit a new one, what happens with the old scores?
3. How is the unique-user-identifier for the user made? Does it read the smartphone-ID (which would mean the user would have to grant necessary permission)?
4. Is there a chance of collision between user identifiers?
Things I have found out myself: Username character limit is 127 (visible in the source code).
hm for some reason in my project everytime i upload an entry with the same name it gets duplicated. my userguid is always changing? upd: nevermind, i kinda fixed it
Just want to report what I believe might be a bug:
I uploaded a score of around 11000 with the name "D" using one device, then, while testing something, I uninstalled my game and reinstalled it. Uploaded a new score of 13000 with the reinstalled app, and it added a new score to the list (I assume it has a new ID now that the game was reinstalled). So, I had two scores of "D" in my list, instead of the first one being overwritten. That was fair enough.
So, I come on here and edited the 11000 scorer's name to "B". When I clicked ok (the "check/tick" button), the 13000 score was edited too: the score was changed to 11000 (though the names remained as I put them). I ended up with two scores of 11000, with the names "B" and "D", even though I never edited the other one.
How come this happened? I assumed the ID would've changed if a new entry had been added instead of overwritten, after I reinstalled the game.
It also happens if I try to delete the "duplicate" entry. I had two scores, from the same device, with the same "D" name: one at 20k pts, the other at 11kpts. I deleted the 11k pts one, and the other ones score changed to 11k.
← Return to Leaderboard Creator
Comments
Log in with itch.io to leave a comment.
Hi there! I love your tool, I used it for a couple of jams and it is very easy to implement <3 I referenced you in my itch page.
I only have one question, I'm using v2.8 since may 2024. But there are everyday several periods of 20-40min where the leaderbords won't respond, always from 21.00-22.00 CET, even trying to open them from here (leaderboard-creator) it says "Internal server error". Is it a known issue that you are fixing on the 3.0 or do you know that this is happening?
I mean it is free so no problem, and I also managed those cases from the games, so you can play them without leaderboard, but it's a pitty when some player tells me that couldn't open the game :(
how to show my game leaderboard in itch.io page ?
In leaderboard we can upload user's Names but isn't there anyway to upload user's profile pics
I mean I saw a variable named Extra but when send my string (basically a base64 string converted from a sprite) but the problem is that the characters of that string are more than 700 but the allowed amount of characters of that Extra variable is 100
I have tried reducing the quality of that sprite and convert it to jpeg instead of png but still the characters are more than 100
What should I do in this case any ideas?
You should not be storing the full sprite in string, you should create some kind of ID for a sprite in a scriptableObject or something and save that in the extras. I created a little class that helps me store data in a single string in a KvP way, hope it helps:
Hey devs :)
if you use GODOT, it will also work!
I didn't find tutorials online, so I decided to make one. Here you can find the gist: Simple leaderboard in Godot
I will be working on the devlog soon, please let me know in the comments for gist what you want to see in it :)
Also, if you want to secure your leaderboard in Unity to verify that the entries are coming from the game itself and not from POST requests, I've made a devlog describing exactly that:
Hacking Leaderboard like a PRO
P.S.
Absolutely love this tool :)
Thank you! Found this by your yt video and it was really helpful. Very easy to use and that 1 minute video gives almost all the explanation you need.
Hey, great plugin! I recently published my game, which uses this plugin, and some of my players encountered an issue where their new high scores are not available on the leaderboard. I'm asking here because I read the documentation and couldn't find anything about this. Here is my code :
void CheckLeaderBoardUpdate() {
if(GD.BestScore > 0) {
Leaderboards.MainLeaderBoard.GetPersonalEntry(entry => {
if (entry.Score != GD.BestScore) {
UploadEntry(Leaderboards.MainLeaderBoard, GD.BestScore);
}
if (entry.Score == GD.BestScore) {
InfoText.text = entry.Score.ToString() + " : record sync";
}
}, error => {
InfoText.text = "error";
print(error);
});
}
}
public void UploadEntry(LeaderboardReference leaderboard, int score) {
if (GD.PlayerName != null && GD.PlayerName.Length > 0) {
leaderboard.UploadNewEntry(GD.PlayerName, score, isSuccess => {
InfoText.text = "New record uploaded";
});
}
}
The players who encountered this bug are already in the leaderboard, and their
GD.playerName
is not null.I hope you can help me !
Hi guys, hope you're fine.
Is there a possibility to automatically clear all entries in the leaderboard?
When I try to create a new leaderboard I get an error
A page embedded in html-classic.itch.zone says
abort("both async and sync fetching of the wasm failed") at Error at jsStackTrace (https://html-classic.itch.zone/html/11396104/
LeaderboardCreatorWebBuild/Build/
LeaderboardCreatorWebBuild.framework.js:9:216393)
at stackTrace (https://html-classic.itch.zone/html/11396104/
LeaderboardCreatorWebBuild/Build/
LeaderboardCreatorWebBuild.framework.js:9:330280)
at abort (https://html-classic.itch.zone/html/11396104/
LeaderboardCreatorWebBuild/Build/
LeaderboardCreatorWebBuild.framework.js:9:697)
at getBinary (https://html-classic.itch.zone/html/11396104/
LeaderboardCreatorWebBuild/Build/
LeaderboardCreatorWebBuild.framework.js:9:12538)
at https://html-classic.itch.zone/html/11396104/
LeaderboardCreatorWebBuild/Build/
LeaderboardCreatorWebBuild.framework.js:9:12871
Very nice plugin.
I have a problem though, I ticked "ascending order" by accident and now my leaderboard is reversed and I don't know how to get it back in a descending order. Can someone help me ?
Yes, you have to click on "Ascending order" again. It is a toggleable checkbox. Once you click it, a green text will appear "Sorting order has been updated successfully!", and the checkbox is unchecked like it used to be.
Thanks for your asnwer, I already tried that though. It just stays in ascending order. I waant it to be in descending order like it was before.
Thank you so much for your tool. I have additional questions that are not outlined in the docs:
1. How many scores can be submitted to the board in total?
2. When the max submittable scores are reached, what happens when you submit a new one, what happens with the old scores?
3. How is the unique-user-identifier for the user made? Does it read the smartphone-ID (which would mean the user would have to grant necessary permission)?
4. Is there a chance of collision between user identifiers?
Things I have found out myself:
Username character limit is 127 (visible in the source code).
hm for some reason in my project everytime i upload an entry with the same name it gets duplicated. my userguid is always changing?
upd: nevermind, i kinda fixed it
Thanks for the great tool!
how did you manage to upload multiple entry in the same account
You saved my Jam, for Real!! <3
is there a way to implement this in a game not using unity?
Yes, feel free to reach out to me for other possible integrations.
Just want to report what I believe might be a bug:
I uploaded a score of around 11000 with the name "D" using one device, then, while testing something, I uninstalled my game and reinstalled it. Uploaded a new score of 13000 with the reinstalled app, and it added a new score to the list (I assume it has a new ID now that the game was reinstalled). So, I had two scores of "D" in my list, instead of the first one being overwritten. That was fair enough.
So, I come on here and edited the 11000 scorer's name to "B". When I clicked ok (the "check/tick" button), the 13000 score was edited too: the score was changed to 11000 (though the names remained as I put them). I ended up with two scores of 11000, with the names "B" and "D", even though I never edited the other one.
How come this happened? I assumed the ID would've changed if a new entry had been added instead of overwritten, after I reinstalled the game.
Hey Silver Fang, I will look into the issue, thanks for notifying about it.
It also happens if I try to delete the "duplicate" entry. I had two scores, from the same device, with the same "D" name: one at 20k pts, the other at 11kpts. I deleted the 11k pts one, and the other ones score changed to 11k.
Is it possible to embed a full leaderboard into a webpage?
Yes, using:
https://lbexp.danqzq.games/download
I mean, in a way where the leaderboard in the webpage will update in sync with the one in the game?