Add local highscore & online leaderboard to autorunner?

0 favourites
  • 9 posts
From the Asset Store
Ludo Local Multiplayer board game can be played by 2 to 4 players
  • Hello,

    I'm making an autorunner game based on the Autorunner Template and wanted to include a local highscore and online leaderboard, but i don't know how to do it.

    I have 3 layouts, Menu, Game (gameplay) & Game Over. I've managed to display the players score on the Game Over layout by setting text to "Your score " & round(TotalDistance) & " ". But i wanted to have the players highscore displayed on the Menu layout (even if they exit the game and go back in, that score will stay) and i want that score on the menu to change when it's been beaten, i don't know how to do this so i hope someone can help out.

    With the Online leaderboard, i want to add a button on the Game Over screen that allows you to post your score online. I also wanted to create a button on the menu which takes you to the online leader which displays the top ten scores.

    I hope i'm not asking too much and would appriciate any input.

    Thanks

  • about local highscore you may use Webstorage

    ===when game over===

    if webstorage key"highscore"exist

    &

    if webstorage value ("highscore")<now score

    then

    webstorage>set local value(key=highscore,value=score)

    ===to get highest score and display in menu===

    set showscore.text = "The best : "&webstorage.get("highscore")&"!"

    ===how about online???===

    There is many way to make it

    but i guess you need to creat a php web server

    or use other planform

  • I've tried what you've said but it's not working for me, could you show an example with the AutoRunner Template so i can see where i'm going wrong?

  • HEre you are

  • It's a bit of a hard link to find at the top, but it's there... I jest of course. There is a 90% chance there is a tutorial for whatever you are looking for... providing you can find the right search words.

    https://www.scirra.com/tutorials/top

    "leaderboard"

    https://www.scirra.com/tutorials/search?q=leaderboard

  • jayderyu I've searched for tutorials but although there are tutorials here on leaderboards, unfortunately I haven't come across one that suits my needs. There are a lot of tutorials so there could be the odd chance I've missed it but I have had a good look and not found one that I need, so I'm hoping people on here can help.

    fongka2 Thanks for the link but that hasn't worked for me. Could you perhaps do it based on the Autorunner Template as requested? My game is set up based on that template so that would help me out a lot as I can see where I'm going wrong.

    Thanks

  • jayderyu I've searched for tutorials but although there are tutorials here on leaderboards, unfortunately I haven't come across one that suits my needs. There are a lot of tutorials so there could be the odd chance I've missed it but I have had a good look and not found one that I need, so I'm hoping people on here can help.

    fongka2 Thanks for the link but that hasn't worked for me. Could you perhaps do it based on the Autorunner Template as requested? My game is set up based on that template so that would help me out a lot as I can see where I'm going wrong.

    Thanks

    that capx upload on this forum.............

    im 100% i can download it

    check your browser

  • I can download the capx file you've uploaded, that's not the issue. I have downloaded the file you've uploaded but that doesn't solve my issue for me.

    What I'm asking is if you can do a local high score for the Autorunner Template on Construct. That would help me as my game is based off that and I can see where I'm going wrong.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can anyone else help me out with this please? It's a pretty important part of my game so would be grateful for help.

    Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)