Comments

Log in with itch.io to leave a comment.

Viewing most recent comments 161 to 200 of 210 · Next page · Previous page · First page · Last page

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.

(+1)

its working in the editor, but in the android build its not, is there any way to fix this? is Android/iOS even supported? thanks, amazing tool

Hello!

Pretty sure before the update it worked well on Android/iOS devices. It seems as if there is some issue, I will see what I can do to make it work again on mobile.

thank you so mcuh, would using the previous version do it for me? and if yes where can I find it, thanks

(+1)

Hey dan :) i keep getting strange bugs on different browsers.. now its working on edge but not on chrome lol, added you on Discord if you could help me out :) thanks in advance !!!

Hello!

That is rather strange, but I'll help you out on Discord.

Thank you for the previous responses! it solved most of the problems!
one last thing, when running the game on chrome everything is working properly, when running the game on edge i get this :
Denied load of: 
chrome-extension://gacgndbocaddlemdiaadajmlggabdeod/injectedScript.bundle.js. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.

Failed to load resource: the server responded with a status of 409 ()
lcv2-server.danqzq.games/entry/upload:1

is it possible to use the leaderboard on edge ?

(+1)

Hello!

I mainly use Google Chrome. However, I will run some tests on other browsers to see if this is a persistent issue. If I will try my best to identify the cause of this error and come up with a fix asap. Thanks for your insight!

(1 edit)

having some issues with this, i installed newtonsoft.json on visual, added the corresponding dll files to the project folder.
yesterday it worked, but crashed after leaderboard was showing on the internet, today i changed the version of newtownsoft to be more accurate to my unity version and now cant upload at all.
getting the:

Failed to upload leaderboard entry.

UnityEngine.Debug:LogError (object)

Leaderboard:<SetLeaderboardEntry>b__5_0 (bool)

do you know how to fix this? 
if i dont import the dll files to my project folder i cant even run the game.
now i dont remember what dll i put yesterday to make it work halfway (until the crash after leaderboard loaded at the end, after keaderboard loaded i saw correct values but then game became frozen and unclickable)

Dan.Main.LeaderboardCreatorBehaviour/<HandleRequest>d__4:MoveNext ()

any ideas ?

Hello!

Here are the recommended steps to downloading the latest Newtonsoft.Json package for Unity projects. Prior to following the steps mentioned below, I would recommend removing the previously added DLL of the package and reopening the project as to avoid any 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)(-1)

amazing thank you !!!!!!

Hey, one small problem: When i try to download it, unity says:

 ´Cannot find a version of package [com.unity.nuget.newtonsoft-json] compatible with this Unity version (2021.3.22f1). [NotFound].

UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()´

I am using version 2021.3.22f1, can i download it somehow else? Or am i just doing something wrong?

Thank you,

Reko

(+1)

Hello!

Newtonsoft.Json unfortunately seems to be incompatible with this version of Unity, so either download and use an older version or consider reaching out to Unity for support.

Unfortunatly i started to program the whole game in this version, so i don´t really wanna copy and paste and do that stuff to another version. But thank you for help and i will try to get reply from Unity support.

Reko

(1 edit) (+1)

I was having the same problem with this Unity version but managed to download it by clicking on "Add package by name..." instead and pasting: com.unity.nuget.newtonsoft-json

Hope this helps.

Hi Danial!

I recently implemented your leaderboard system in my game, and I'm experiencing some issues when trying to use it on my Android device. Specifically, the leaderboard is not displaying any names and is not allowing me to submit my own name.

I have tested the leaderboard on my PC during development, and everything worked perfectly without any errors. I'm not sure why the leaderboard isn't functioning correctly on my Android device, especially as you state that the creator works with Android.

Could you provide some guidance or assistance in troubleshooting this issue? I'd appreciate any help you can offer to get the leaderboard working correctly on my Android device.

Thank you for your time.

Best regards,

PLAFTRIK

Hello!

I'll gladly help you out as soon as I am available. Just hit me up on Discord: @DAN#3389

(1 edit)

Great tool ! Thank you for the amazing work !!
I am having one issue, when a player gets a lower score, extras still update. how can i exclude updating extras if the score is lower then previous? 

Hello!

Unfortunately, there isn't a straightforward approach of doing this. However, you can tackle this by first getting the leaderboard, going through each entry, and checking if the user has submitted their entry before, using the boolean method leaderboardEntry.IsMine(). Then you can determine whether or not you change the extra field of the player's entry or leave it as is.

(+1)

Understood, thank you ! :)

Hi Daniel!

I love this tool! However, I can't get it to work correctly. When I upload a new entry (via code) the username of the first entry changes with the score (if the score was higher then the previous one). Aka it doesn't create a new entry. What can I do?

(+1)(-2)

Hello!

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.

HI Dan,

When i use the profanity filter and type in a rude word it crashes the game?

LeaderboardCreator] Uploading entry data failed!

UnityEngine.Debug:LogError (object)

Dan.Main.LeaderboardCreator:LogError (string) (at Assets/LeaderboardCreator/Scripts/Main/LeaderboardCreator.cs:100)

Dan.Main.LeaderboardCreatorBehaviour/<>c:<SendPostRequest>b__2_0 (bool) (at Assets/LeaderboardCreator/Scripts/Main/LeaderboardCreatorBehaviour.cs:53)

Dan.Main.LeaderboardCreatorBehaviour/<HandleRequest>d__3:MoveNext () (at Assets/LeaderboardCreator/Scripts/Main/LeaderboardCreatorBehaviour.cs:66)

UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17)

Any help isappreciated.

Hello!

This should not cause any crash as "Uploading entry data failed!" is just a log message that gets printed into the console.

Hi Daniel!


Great tool! One issue I am having is when someone uses the same initials it wont input the score, is there a way to work around this or an option I've missed?

(1 edit)

Hello!
Unfortunately that may not be possible, as usernames are used to identify each player.

But if a player beats their highscore and wants to use the same initials is this not possible?

(+1)

It is possible, I have recently updated the server's behavior though to support the next update. This will work with newly created leaderboards, but I am also currently working on a workaround for older leaderboards, so expect this to be fixed very soon.

(+1)

Awesome because people tend to re-enter the same name when they get a score and it would be amazing if this worked! Thanks for your reply Danial! 

Hi Danial,
Thanks so much for making this tool! 
For some reason, when deleting leaderboard entries from this interface, it says "Not Found". Is there any workaround for this?
I'll be sure to share my game with you once it's complete.
Thanks!

(+1)

Hey, thanks for using the tool! I am about to release a new update that is changing the way scores are saved internally, so I'll look into fixing that issue. The update will be live soon, so stay tuned!

(+1)

Edit: Removing items seems to work just fine if I leave the leaderboard name unchanged. Looking forward to the update, and thanks again!

(+1)

The update was released, and your described problem shall no longer be an issue!

Viewing most recent comments 161 to 200 of 210 · Next page · Previous page · First page · Last page