Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Silver Fang

7
Posts
A member registered 72 days ago

Recent community posts

(2 edits)

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.

Is it possible to embed a full leaderboard into a webpage?

I mean, to convert it into a boolean within my own script? So I can add something like:

if (loadFail == true)

    failMessage.SetActive(true);

(2 edits)

Anyhow, I don't think it's the GetMine() method I need, it's the GetPersonalEntry() method. Took me a while, but I finally figured out how to use it.


Incidentally, is there a boolean I can call if the Leaderboard fails to load? I.e. if the player is offline. I just want to use it to display a message if the leaderboard fails to load (I see that the servers for it go down frequently as well).

I followed this tutorial video to implement the scoreboard:

But I'm not displaying the scores, only loading the scoreboard, because I don't want my game to display them all, just the player's personal score. So, I haven't included the loops shown in the video, just the function, and an empty version of the "LeaderboardCreator.GetLeaderboard" condition.


At present, I just have the function showing the top three scores, for the sake of testing, but my next step is to access the player's personal score and display that (which I'll then use to get the scores ranked directly above and below it).


So far, the condition looks like this:

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

        {

            

            rank1text.text = "#" + msg[1].Rank.ToString();     //Set the highest displayed rank

            rank1nameText.text = msg[1].Username;       //Set the highest displayed rank's name

            rank1scoreText.text = msg[1].Score.ToString();       //Set the highest displayed rank's score

            rank2text.text = "#" + msg[2].Rank.ToString();     //Set the middle displayed rank

            rank2nameText.text = msg[2].Username;       //Set the middle displayed rank's name

            rank2scoreText.text = msg[2].Score.ToString();       //Set the middle displayed rank's score

            rank3text.text = "#" + msg[3].Rank.ToString();     //Set the lowest displayed rank

            rank3nameText.text = msg[3].Username;       //Set the lowest displayed rank's name

            rank3scoreText.text = msg[3].Score.ToString();       //Set the lowest displayed rank's score

            //bool isMine = msg.IsMine();

            //Debug.Log(msg.IsMine().Score);

            //Debug.Log(LeaderboardCreator.GetPersonalEntry(publicLeaderboardKey, Whatever goes in here));

        }));


You can see lines I've commented out. These were my attempts to use IsMine() and GetPersonalEntry, but every attempt gave me an error.

How to use the IsMine() function to search for the Player's own score in the list? I get errors whenever I try to use it, saying "Entry does not contains a definition for IsMine".


I just want to be able to access the player's personal rank without any errors coming up. Once I've done that, I feel I can handle the rest from there with what I want to do (displaying the rank, etc).

I'm seeing that V2 will be replaced by V3 soon. If I were to download V2 and set it up in my game now, will I have to change everything when a V3 update is required?


Just figuring out if it's worth me practicing with V2 now, or just waiting for V3.