Leaderboard creation

0 favourites
  • 6 posts
From the Asset Store
A small template showing how to build a firebase ranking
  • Hi

    I have a simple endless runner which creates a high score when the player dies.

    I want the ability to post this high score into a MySQL database so the player can compete with others.

    I don’t want them to have to login to submit scores.

    Does anyone have any hints/tips?

    Thanks in advance

    Andy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    I have a simple endless runner which creates a high score when the player dies.

    I want the ability to post this high score into a MySQL database so the player can compete with others.

    I don’t want them to have to login to submit scores.

    Does anyone have any hints/tips?

    Thanks in advance

    Andy

    Without any login/authentication requirement, this is super-easy. We did something similar for one of our sims/games on . All you need is a AJAX POST request with the data to a php script running on the server. It is super-easy to spoof, with virtually no security, but we weren't really worried about that for our purposes because we could just reset the high score if someone decided to mess with the system.

    If you are worried about making sure the high scores aren't tampered with, then you will need to do some sort of user authentication.

  • Hi

    I have a simple endless runner which creates a high score when the player dies.

    I want the ability to post this high score into a MySQL database so the player can compete with others.

    I don’t want them to have to login to submit scores.

    Does anyone have any hints/tips?

    Thanks in advance

    Andy

    This should fit <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    https://www.scirra.com/tutorials/346/on ... -php-mysql

    Regards

    Andy

  • > Hi

    >

    > I have a simple endless runner which creates a high score when the player dies.

    > I want the ability to post this high score into a MySQL database so the player can compete with others.

    > I don’t want them to have to login to submit scores.

    >

    > Does anyone have any hints/tips?

    >

    > Thanks in advance

    >

    > Andy

    >

    Without any login/authentication requirement, this is super-easy. We did something similar for one of our sims/games on http://www.simbucket.com. All you need is a AJAX POST request with the data to a php script running on the server. It is super-easy to spoof, with virtually no security, but we weren't really worried about that for our purposes because we could just reset the high score if someone decided to mess with the system.

    If you are worried about making sure the high scores aren't tampered with, then you will need to do some sort of user authentication.

    Thanks - I'm not worried about security - it's just to win a bottle of wine for a bit of Christmas fun.

    I had a tutorial from Construct2, but it doesn't seem to work on 3, and I'm on a mac, so cannot install 2.

    Did you manage to get it to work with V3?

  • > Hi

    >

    > I have a simple endless runner which creates a high score when the player dies.

    > I want the ability to post this high score into a MySQL database so the player can compete with others.

    > I don’t want them to have to login to submit scores.

    >

    > Does anyone have any hints/tips?

    >

    > Thanks in advance

    >

    > Andy

    >

    This should fit <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    https://www.scirra.com/tutorials/346/on ... -php-mysql

    Regards

    Andy

    Hi Andy

    Thanks - Does this work on 3 though? I tried this from this article

    https://www.scirra.com/tutorials/4839/c ... -php-mysql

    But it's not working on Construct3

    It doesn't load the scores from the PHP file, and doesn't allow me to submit a score.

    Thanks

    Andy

  • As mentioned in the comments of the tutorial, is your server using PHP 7 ?

    If so, you need to modify a few lines of the script in order for it to correctly connect with your MySQL database.

    Note: Otherwise, check for errors in your browser, this will give exact clues as to what is going on.

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