Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 91 to 130 of 150 · Next page · Previous page · First page · Last page

Hi Dan, I would like to know the ranking position of a Username.

I tried the following code, but it doesn't find anything.

Can you help me? Thank you very much.

public void LoadRankingPosition()

{

LeaderboardCreator.GetLeaderboard(_leaderboardPublicKey, LeaderboardSearchQuery.ByUsername(_playerUsernameInput.text), RankingPosition);

}

public void RankingPosition(Entry[] entries)

{

_rankingPosition.text = $"{entries[0].RankSuffix()}";

}

Hello!

Technically the code you've written here should be working if there is an entry in the leaderboard. I recommend checking out the updated demo scene, which demonstrates how to obtain the ranks of the entries. Its included in the downloads.

(+1)

Hello, I am having a problem with my current leaderboard system in WebGL build. I will use this instead of that! Thank you

(1 edit)

Hi thanks for this cool leaderboard tool, I'm having trouble with duplicate names, when I add then im unity it will not update,but in your itch.io page it does respect duplicate names?

T.I.A


Kind regards Ronald van Erp

https://play.unity.com/mg/other/glbuildpublish

Hello!

There is a an option called "Unique Usernames" for each leaderboard. Enabling it will not allow duplicate names, disabling it will allow duplicate names.

(1 edit)

Ok now I have a different problem, when I make a GLBuild the score is set correct and wil move up or down acording to the score, but on my publish build it will only set at index[1] with the same score while the score is different.


Weird thing when I do a local network build it works fine, but when I publish on Unity play , it will sometimes only set at [1],with an old score??

Hello!

This is not a bug, its a feature. As stated in the FAQ of the page, each player may only have one entry. In your case, the player instance on the local network is different from the one on Unity play. You may be asking why this happens.

I explained why this happens in one of my devlogs in itch.io:

Many people were frustrated about why a single player could have only one entry. Well that is because each player will have a unique identifier attached to them on initialization and it will be stored permanently in PlayerPrefs. With this, players can edit or delete only their own entry. This identifier is also used to determine which entry that is being displayed on the leaderboard belongs to the player. Several people apparently were not satisfied with this, so I made the LeaderboardCreator.ResetPlayer() function. After uploading a new entry, you can call it and the next time the player submits again, instead of overwriting the previous one it should create a new one. Just note that the previous ones would be unable to be changed or deleted afterwards.
(1 edit) (+1)

Thank you for this tool, it is fantastic. Very much considering the premium version for our project but have a few questions...

- Are there any security measures in place to revent a malicious actor from sending their own data from outside our unity game to the leaderboard (since we only use a public key), could they send a new 'bogus' highscore and get it on the leaderboard? (Or worst case, remove other entries)

- Is it possible for users to 'share' their username across multiple devices (without completely disabling unique usernames)

Hello!

- Yes there are security measures, however, no leaderboard system is always safe. Even AAA games get hacked entries in their leaderboards. The only way to keep it 100% clean is to regularly monitor it, verify scores and remove potentially hacked entries.

- Technically, yes. There is no direct way of doing it, but you can message me on Discord (username: @danqzq) and we can figure out a way to synchronize user's progress across different devices.

Thank you! Dropped a message 

(+1)

hey Dan,
this is really cool!
thank you so much >:)

I think I found a bug... When using UploadNewEntry and you upload a duplicate entry while "Unique names" is checked, the entry does not upload. But when you upload the entry with a different name (thats not a duplicate), and then change the name to a duplicate name, the name actually changes...

Hello!

I'm having trouble understanding what you are trying to say, but just to clarify, you are using UpdateEntryUsername to change the username, right?

I think I finally understood and it should be fixed in a few minutes once the server update is live.

Cool! thanks

just in case I'll rephrase:

player 1 creates username: Ben
success
player 2 creates username: Ben
error
player 2 creates username: Ben2
success
now player 2 changes username to Ben
success ...??

now there are two "Ben" 's in database

(+1)

What an awesome tool! We used this in our Game Jam game: Neon Shift. Was super easy to use and made our lives much easier. Will definitley check out the advanced leaderboard when improving our game!

(5 edits)

When I upload to the leaderboard with ascending order checked it only changes my score if I get a higher score(worse in my game) but not if I get a lower score(better in my game)

(+1)

Hello! Working on a fix for this in an upcoming update!

Do you know when the update will release? I'm hoping to add it to a game for the post jam jam

Just released :)

(+1)

I know this is fixed, but what I would do is just encode the score on the leaderboard as 2147483647 - score

This is how people used to do it before the ascending order sorting feature was added 😂

(1 edit) (+1)

Great tool! Thx ;)

(+1)

Absolutely love this tool!
Used it in my game: https://elanmakesgames.itch.io/sandwich-stacker
Thanks so much for making it, and I'll definitely be using it in future projects too :)

(1 edit)

I Get the error "[LeaderboardCreator] Uploading entry data failed!"
right On the line of uploading new one, not on reset and not on getting the leaderboard, the error is simple on the function UploadNewEntry

When I attempt to add a name that is identical to one that is already on the leaderboard, an error occurs.


Hello!

I released a new update where this should be fixed if you toggle off the new option named "Unique Usernames".

Hey Dan, I have a problem. The first time I upload an entry everything works just fine but the second time i can't and get an error saying "Uploading entry data failed!". Everything worked fine 2 days ago and I haven't changed any code. What might be causing this?

public void GetLeaderBoard() {

        LeaderboardCreator.GetLeaderboard(publicLeaderboardKey, ((msg) => {

            int loopLength = (msg.Length < names.Count) ? msg.Length : names.Count;

            for (int i = 0; i < loopLength; i++) {

                names[i].text = msg[i].Username;

                scores[i].text = msg[i].Score.ToString();

            }

        }));

    }

    public void SetLeaderBoardEntry(string username, int score) {

        LeaderboardCreator.UploadNewEntry(publicLeaderboardKey, username, score, ((msg) => {

            GetLeaderBoard();

            LeaderboardCreator.ResetPlayer();

        }));

    } 
Here is the code.

(+1)

Hello! You are calling it correctly, however, before getting the leaderboard you have to wait a certain amount of time, because after the reset - the player's new unique id needs to be fetched from the server to identify as a new player, and all of this does not happen instantly.

(1 edit)

Hi Dan!

Nice work on the tool, it really has helped me a lot, but I'm running into a weird issue.

I'm trying to upload a new high score for an existing player, but I get the error "Uploading entry data failed!".

I'm using "LeaderboardCreator.ResetPlayer();" after uploading every score.

Here's my code


Am I missing something?

Hello!

You should call this method inside the callback at last (so it will trigger after the score is submitted).

Hey Dan, big fan of your work.

I seem to be having the same issue and this doesn't seem to be resolving the issue. I have it written like this; am I not calling the method inside the callback properly?

Thanks a lot.

LeaderboardCreator.UploadNewEntry(publicLeaderBoardKey, username, score, ((msg) => {

            LeaderboardCreator.ResetPlayer();

            GetLeaderboard();

        }));

Hello! You are calling it correctly, however, before getting the leaderboard you have to wait a certain amount of time, because after the reset - the player's new unique id needs to be fetched from the server to identify as a new player, and all of this does not happen instantly.

Thanks for reaching out.
I tried using the invoke function to add a delay between the reset and getting the leaderboard however my uploading entry data is still failing.

        LeaderboardCreator.UploadNewEntry(publicLeaderBoardKey, username, score, ((msg) => {

            LeaderboardCreator.ResetPlayer();

            Invoke("GetLeaderboard", 45f);

I updated the Unity package to include a callback argument in the ResetPlayer() function, so call the GetLeaderboard() method inside of it to fully await the reset process.

Hi, Dan! Very nice work and thanks a lot for sharing and keeping it updated! <3

I'm using the tool in an Android game, but for some reason it is only working in the Engine. I build some APKs to test it but it doesn't retrieve the data from my Leaderboard... I followed the video from SamYam and at least the score from the mobile game was reaching the leaderboard... Don't know if I'm missing something. 

Does anyone had similar issue?

Hello!

Yeah I have had people talk to me about the tool not working as intended on Android. I am investigating the problem and I might have found a potential solution, just need to test it and release it.

That's awesome! 

Thank you very much for your support!

Hi, Dan!

Just reporting that now even the scores from mobile isn't reaching the Leaderboard, don't know if you changed anything server side.

Hey can you reach out to me on Discord? I want you to try out a new package of the tool which should solve this issue. My Discord username is @danqzq.

Hey, I'm dealing with a major bug. It wasn't a problem when I first used this tool. Basically whenever I use upload new entry it replaces a previous entry if its score is higher and if its score is lower it only replaces the name of the previous entry. Don't know what could be causing this, I didn't change the script from when it was working.

Hello, this is not a bug but a feature. Each player by default can only have one entry in the leaderboard. If you do not want this, then call the following function right after submitting a new entry:

LeaderboardCreator.ResetPlayer();

What does it use to detect a different player, cuz these are all from separate instances of the game.

It uses PlayerPrefs

Hey, where do I get my secret key after purchasing the advanced leaderboard

Hello!

I sent you an email with the secret key for activating it, thank you for your purchase! :)

is there a way to set it up so it gets the name before it starts the game and after when the game gets a winner it auto puts a score onto the username the player put in before

That's a good suggestion. will give it a try.

Hello!

Yes it is plausible to do so. Just let the user input the name first, then save it via PlayerPrefs or other saving method and load the name value when submitting the score of the player.

(1 edit)

I keep getting an error when I try to upload a new score. "Username already exists" when uploading a second score. 

I have a WebGl game and users are using their crypto wallet addresses as usernames which would be unique. 

Any suggestions how I can resolve this issue would be cool. Tks.

Hello!

This error only occurs on the web app of the tool itself, because each test entry is created with a different unique identifier. This will not happen when you integrate the tool in your game, because each player will have a unique identifier assigned to them when launching your game, and it will remain constant unless PlayerPrefs are cleared. Give it a try by downloading the Unity package with the demo scene.

(3 edits)

I just downloaded the leaderboard+demo unity package and after importing the unity package I get these errors that you can see in the screenshot. Can you fix them?

I also tried the leaderboard unity package without the demo. It had the same errors.

  1. Open the Package Manager window in your Unity project.
  2. Click the plus icon on click "Add package from git URL"
  3. Paste this in the URL field and then press Add:
com.unity.nuget.newtonsoft-json@3.0


(1 edit) (+1)

I tried the directions you gave exactly but Unity complained that version 3.0 of Newtonsoft Json was not compatible with the version of Unity I was using (2021.3.26f1). I then decided to remove the "@3.0" portion of "com.unity.newtonsoft-json@3.0" that you provided and Unity was able to install the latest version of Newtonsoft Json which is apparently at the time of this post 3.2.1. Just thought I would let you know. 

Alright, thanks for letting me know!

I had the same problem so thanks for the fix!! Before it was overwriting the top spot every time I tried to make a new entry. I had the namespace error about needing newtonsoft. Thank you!! Works great now.

(1 edit) (+1)

Hey I purchased the advanced leaderboard, how do I activate it on my leaderboard?

Hello!

Thank you for the purchase! Sent you a secret key for activation!

(1 edit) (+1)

Hey there. Does this tool handle duplicate names or does the Developer need to write a system to prevent that?

Hello!

Duplicate names are allowed. Unfortunately if you want unique usernames then you'd need to handle that by yourself by comparing usernames with other entries' usernames. However, allowing only unique names is going to be added as a toggle in the next update.

(+1)

This leaderboard tool came in clutch when I was participating in a game jam a few weeks ago, super easy to implement!

Check out the game I made here.

Check out a devlog on the development here.

Thank you Dan, this thing is awesome!!

Hi Dan, After the update I can’t find my leaderboard

Hello!

If you still own the leaderboard's public key, reach out to me on Discord:

@DAN#3389

All right, thanks for your response

(+1)

Awesome tool thank you!

To all, if you want to single out a certain user in the leaderboard (the one using it), this is how I do it :

  private void OnLeaderboardLoaded(Entry[] entries)

        {

            foreach (var entryField in _entryFields)

            {

                entryField.text = "";

            }

            for (int i = 0; i < entries.Length; i++)

            {

                _entryFields[i].text = $"{i + 1}. {entries[i].Username} : {entries[i].Score}";

                if (entries[i].Username == SavedUsername)

                {

                    _entryFields[i].text = $"{i + 1}. {entries[i].Username} : {entries[i].Score}" + " (You)"; //Tell player which score is his

                    _entryFields[i].color = new Color32(255, 0, 0, 200); //Make userscore red to stand out

                }

            }

        }

Alternatively, instead of comparing usernames you can just put entries[i].IsMine() in the condition.

Thats handy!

Is there a way to clamp the players score to the bottom of the screen?

Of course. You'd just have to find the player's score by using the .IsMine() method and display the properties of the player's score at the bottom.

Hello :) Love the leaderboard!! Is there any way to add a new score to the previous score of the same user?

Hello!

Thanks. Theoretically, yes. You can upload each score normally, but save the previous ones, join them together in a string and put it in the extra field of the entry. You then split and parse the string to attain the previous scores when getting them from the leaderboard.

Hi Dan, I have no idea why my leaderboard was missing from the list after the update, and the web inspector said that some requests have been blocked by the client [No blocker was used].

Hello!

It is advised to store the secret keys of your leaderboards elsewhere, as in the browser they are only held in the site's data. They might have went missing because you cleared the cache or site data. If you still own their public keys, you can DM me on Discord (@DAN#3389) and I will find their matching secret keys for you.

As for the requests that are being blocked - I have no idea. If you could be more specific and provide screenshots of the errors, I might be able to figure it out.

When I download version 2.3, there are several errors with the imported scripts. 
- type/namespace 'Enums' does not exist in 'Dan'
- type/namespace 'Routes" could not be found

Hello!

I forgot to include a folder by mistake, updated the package once again to include it. Thanks for letting me know!

Hello, I'd like to know if there's a way for it to enter a new entry instead of changing the name of the first one. 

I tried clearing playerprefabs with PlayerPrefs.DeleteAll(); but it didn't work. Pretty please.

Hello!

You're lucky because I just released a new update that can resolve this issue for you. I recommend reading the devlog I posted about it.

Thanks you so much!!!

(1 edit)

Yo! Love this thing, its working great in my game. 

Is there any way to export the data? Or at least be able to copy and paste the data to an external document?

Hello!

Not yet. But its a great idea! What format would you prefer?

it would be good if it is Excel

(1 edit)

Added an exporter into the site! Just scroll down to right above the Credits section, and you should see it there.

Hey, im new to coding and i wanted to know how to submit a float in the leaderboard instead of an integer. Im trying to do a "Timeleaderboard" but i can only use Full numbers and nothing like 20,23 Seconds.

Hello!

The tool was designed to only work with integer numbers for the score. There are several approaches to solve your problem. One of them, is to simply multiply your time value by 100, and then convert it to an integer number and submit it. When receiving, you would simply follow this procedure backwards, you would just divide each of the score values by 100.

hi i accidentally reloaded the page but i cant add my existing leaderboard with the key

can someone tell me what i might have done wrong

(1 edit)

never mind i enterd the public key insted of the secret key

Hi, on PC, I have a similar issue to a user below, works in editor, but not in build.

Hello!

Left an answer on the fix in the comment below.

(1 edit)

Let me update my message as that wasn't clear. 

It builds, but can't access the online server when built, only when run in play mode.

Can you determine exactly what the error is in the build?

Hello!
This is awesome service, thank you for it.
I have 1 question: I try to compare username, that player enters in InputField and other usernames in leaderboard using th code below, but even if usernames are same - if statement doesnt work and I dont understand if it is my fault or this is not the right way to do it?

Hello!

This won't work, because isTaken only will be affected after the callback was triggered. Essentially, you have to take the if-else statement you wrote at the bottom, and put it inside the callback, right after the for loop.

(+1)

Hi, I don't know why but,

Uploading new score with a different name, just changes the name of the entry. It changes the score if the new one is higher.
Manually entering new name and score here in the page works as normal, but in my game, it just changes the name.

Why does it not make a new entry with a new name?

Can you please help me?
This service is very handy, except for this problem.

(-2)

I saw a comment thread about clearing playerprefs. That worked. Nothing against it but it's kinda counter intuitive. Tho, still a good service.

(+1)

It was done this way to allow users to be able to change and delete ONLY their own entry from the leaderboard.

Hey, do you know why any entry to the leaderboard's rank variable is always 1?

Hello!

Not sure why, I will check it out on my side. For the time being you could identify the rank manually through looping.

 Thanks

Tried, but found that having multiple users type the same username breaks it, and userguid is always null, so I'll wait on you to fix the rank.

The guid string will only persist if it is your own entry, so as to protect the editing of other entries. But yeah I'm working on a fix.

I think I found the issue. When you loop over the entries your code:

var entry = entries[i];

entry.Rank = i + 1;

Entries is a struct so you create a new value that you set the rank of, leaving the value in the array unchanged.

It worked for me if I replaced it with just:

 entries[i].Rank = i + 1;

Yes that was the issue, however, I decided to move the rank handling along with the filtering to the server-side. Another update is imminent!

(+1)

Fantastic tool, Dan.  I first saw it in a video from SamYam.  Tried it out in my entry into GDKO (game dev knock out) Round 4, where the focus was to recreate the Atari classic: Centipede.

Final game can be played here, if anyone is interested: Centipede 3000.

I also made a dev log for this entry and referenced both you and SamYam.  Really appreciate you making something like this available for free.  Cheers!

Hello!

Very nice!

(1 edit)

Hello There !

Don't understand this behavior. When I run the WebGL. I get "no leaderboards added", even tho I have created one or several times. Just checking if anything else should do before running this tool? I also input some scores in my leaderboard, save them. Reload page and still "no leaderboards added"

Hello!

Probably has to do with the behavior of your browser, the information of the leaderboards you create are saved locally. Your browser may be erasing the site data on reload or not saving it at all.

Thank you Dan.

That was the problem.

I'm getting some odd behavior.  Your demo scene works fine in my project, however when I replace the public key with a new one that I generate.   Only one entry is able to be updated, no matter the name / score.   Any suggestions?

Hello!

I answered a similar question before:

After the new update it is supposed to be like that. This is because each player may only have one leaderboard entry to prevent spamming. If you want to add more entries into the leaderboard on your own, you will have to do it through the web app here.

Ah, thanks for answering that.   Can you recommend any good methods to test different users posting to the board within the editor? 

One of the options is to just clear the PlayerPrefs.

Perfect!  Great job on this. 

Another question: You say that one player can only have one leaderboard entry, but how are you deciding if this is the same player? Is there any way to remove this?

Also, when I upload a new entry from the same player, on this app it shows that the usernames were replaced, but on the callback function, both the old entry and the new one exist, causing some  problems in the UI, eg. your old highscore with your old username shows up, as well as your new highscore with your new username.

(1 edit) (+1)

Currently I verify the player by a unique identifier that is given by the server. If you clear PlayerPrefs, you will be able to submit another score, now as a different player. I can understand why you would want to remove this, so I will consider adding this as a toggle option too in the next update.

(1 edit)

Can you also explain why when I upload a new entry from the same player, on this app it shows that the usernames were replaced, but on the callback function, both the old entry and the new one exist, causing some  problems in the UI, eg. your old highscore with your old username shows up, as well as your new highscore with your new username.

Probably because you forget to delete the old leaderboard entry game object.

Here is my code: 

When the old entry that was replaced because the same user added a new entry,

they were both instantiated.

(1 edit)

Hey, I'm wondering how to detect if uploading a new entry failed because of the profanity filter or because the username was already there. Is there any way to do that?

Hello!

As of now, unfortunately there is no such way to check it in-game. I will look forward to making a way of distinguishing between the errors.

(1 edit)

For the time being, I've edited the code.

(1 edit)

When I call UpdateEntryUsername , I get null response when update learderboard. Previously the Leaderboard had records, but now it empty.

Hello!

Are you by any chance using a leaderboard that was created before the update?

I just called the update name and everything was lost

https://drive.google.com/file/d/1040HqEy9HfNyX1soxsteTciRiRtKK3fm/view?usp=shari...

(1 edit)

Hello again!

The issue should be resolved, can you give it a try now? You do not need to download the package again, it seems as if the fault was on the server-side.

Viewing most recent comments 91 to 130 of 150 · Next page · Previous page · First page · Last page