1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice

Asset - Scripts Online Leaderboard

Discussion in 'Marketplace' started by Vallo92, Sep 29, 2019.

  1. Vallo92

    Vallo92 Member

    Joined:
    Jun 20, 2016
    Posts:
    68


    With this fantastic example you can create a personalized online leaderboard!
    Extensions are not necessary. Everything is created by GML.

    This example allows you to:
    - Create a custom online ranking
    - Send / Receive / Save in a database names and scores
    - View real-time all the new records
    - Create a TOP ten (or more) of the best record
    - Create a web page to show the ranking directly on your site
    - Completely commented and highly customizable!

    This example can be used on all platforms, creating a single classification (or divided).

    REQUIRED:
    - PHP Enabled Webserver
    - SQL Database

    [​IMG]
    [​IMG]
    [​IMG]


    For any questions or information, you can use this discussion.
    It is strictly forbidden to post parts of the code of the "Online Leaderboard" asset.
    For private and fast assistance (available only for those who have purchased "Online Leaderboard" from the Marketplace) you can use the contact form on the developer's page in the Marketplace.
     
  2. OnLashoc

    OnLashoc Member

    Joined:
    Jan 15, 2018
    Posts:
    198
    Awesome! Will definitely dig into this :D
     
  3. MrBakels

    MrBakels Member

    Joined:
    Jul 6, 2016
    Posts:
    14
    I've been searching for a simple leaderboard extension for a while, and this has potential. However, couple suggestions:

    - Anyone can submit scores to leaderboards with http://yoursite.com/sendscore.php?player=PlayerTest&score=10 , when there is no user defined private_key. That should be added.
    - When a player called "Poopface" from Ukraine gets 100 points, and later a player "Poopface" from Australia gets 110, the points of the ukranian "Poopface" gets deleted. There should be a unique user_id to track scores & names, instead of regular nickname.

    Without these, it's really unusable for me.
     
  4. Vallo92

    Vallo92 Member

    Joined:
    Jun 20, 2016
    Posts:
    68
    Hello @MrBakels ,
    Thanks for your feedback.
    The scripts currently allow you to perform the operations that are described on the marketplace page. The functions are "basic" so that anyone can customize the scripts easily according to their needs.
    Implementing your two requests is still very simple (just add 1/2 lines of code).
    For what you are asking, it will be enough for you to simply create a password for the user when starting the game for the first time. Then you can enter the password inside the link of the code sending, and carry out a check before updating the data of your db. Also you can change the names of the link variables, in order to make the link less easy to find.
    You can solve this problem by adding the user's password, which I told you about a few lines above.
    Otherwise, as you said, you can create a unique id (or simply use the unique id that is assigned to the user in the db), and perform a check before updating the score.
    Otherwise, when the user creates his nickname, you can check the current score db, and not make the nickname registration valid, if the same name is already present in the db.

    These are all very simple operations to do, and I didn't want to insert them to make the script basic and easily customizable, without inserting features that someone might not be interested in.
    However if you think that these two functions can be useful to everyone, this weekend I will update the asset, inserting these two options
     
  5. MrBakels

    MrBakels Member

    Joined:
    Jul 6, 2016
    Posts:
    14
    Hi, thanks for the reply. I really appreciate it. If implementing this change is simple, where do I need to put this 1/2 lines of code, and what does the code look like?

    Well, in my opinion these options are a 'must have'. And it makes your project better = more sales.
     
  6. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,870
    Do we really need any more shallow-end online scoreboards from people who are only about a week into PHP, riddled with blatant violations of best practices and security vulnerabilities, to tarnish GM's brand with? Accepting submissions over GET is the most obvious sign of rookie work, and whenever I see that, more serious stuff like easy SQL injections is never far behind.
     

Share This Page