upload highscore to a web based table

Reylegh

Villager
Member
Joined
Nov 30, 2015
Messages
7
Reaction score
0
First Language
Polish/German
Hi,
I am using caethyril 's plugin for a score table, however I need to know if there is a way to send the result to a website or sql table so that I can display the highscores on a website?
I know I can import with a json data to a webpage, but first I would need to get the data out of the local client, and honestly I am completely lost in that.
Any suggestions would be great!
 

Attachments

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
104
Reaction score
45
First Language
English
Primarily Uses
RMMV
I don't have an answer to your question, but this is a very interesting idea, which I've thought about before. If you could figure out how to pass values from the game to, say, a PHP based form, and then post it to a website, you could use it for all kinds of things besides just a leaderboard.

I use a program called PHP Desktop (it's free and opensource) which lets you run PHP webpages on your local PC. You could use that to post the data to a website, if you could figure out how to pass the data to the form. There must be a javascript-based way to do that.
 
Last edited:

Reylegh

Villager
Member
Joined
Nov 30, 2015
Messages
7
Reaction score
0
First Language
Polish/German
(...)
There must be a javascript-based way to do that.
One thing I though about might be a ping to the database with the correct parameters, the problem is, these would need to be hashed so that they don't get intercepted. But then again, not sure how to do that either :/

But you are correct, this would lead to multiple other uses than just leaderboards.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,510
Reaction score
992
First Language
EN
Primarily Uses
RMMV
I have essentially no experience with actual network-based programming, but I think you'd just send/request the data as usual (XMLHttpRequest?) and have it processed accordingly at each end (client/server). That would mean setting up a server appropriately and sending/receiving data in a pre-established format. Some hosts (Steam, Gamejolt, etc) have their own leaderboard/scoreboard APIs: similar idea there except you don't have to do all the server setup. :)

My plugin (Google Drive link in case I update it at some point) is basically just a front-end with some local save features. Once you have the server stuff established, I'm guessing you'd need to rewrite the "get/set" and "new/load/save" methods to work with the network-based stuff.
 

Reylegh

Villager
Member
Joined
Nov 30, 2015
Messages
7
Reaction score
0
First Language
Polish/German
I have essentially no experience with actual network-based programming, but I think you'd just send/request the data as usual (XMLHttpRequest?) and have it processed accordingly at each end (client/server).
Yes, but problem is, such a request is easy seen and can lead to players just taking the request, adding the score number by hand and sending ridiculous values to the tables.

I talked with a frontend dev and he suggested to create a control sum of a value - for example current time - this is then being hashed for exmaple with md5, the remaining params can just be visible, now the server would need to unhash the timestamp and check if it is correct, if the same timestamp hasn't already be send by the same IP within the last 15 minutes, if it's not way in the past or way in the future. This could be a way, as then I could block the same IP from sending another one for at least 15 minutes, which would make the same hash later invalid.
Just timezones create a problem here :/
As some locations would be in the 'future' or the 'past' of the servers time, so I would need to recognise the geolocation as well and translate the timestamp to my timezone... if it's possible, then I will do it, but it sounds crazy ....

If someone has a better Idea, please share :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...
How do you do when you want to work on projects but the game companies make so many games available for free because of the quarantine?
Kes
I have just stepped down from being a Mod, so please don't send me any more pm's with Mod questions. Thanks
Made a brief video showcasing early game play... Got a copyright claim by BIG UP! (https://big-up.style/) for using music I bought from here (Future Steam Punk Pack). Now I wonder if I should strip any purchased music from here out of my game. :LZSskeptic:

Forum statistics

Threads
95,484
Messages
929,493
Members
125,724
Latest member
Elender
Top