Asset - Scripts Online Leaderboard

Vallo92

Member


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





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.
 

MrBakels

Member
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.
 

Vallo92

Member
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).
- 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.
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.
- 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.
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
 

MrBakels

Member
,
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.
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?

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
Well, in my opinion these options are a 'must have'. And it makes your project better = more sales.
 

FrostyCat

Redemption Seeker
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.
 
Top