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
102
Reaction score
44
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,464
Reaction score
952
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

People in Italy panicking for this stupid coronavirus, it's nothing more than a flu and they are all acting like it's the black plague...
Blech. I hate coming up with stories. Making gameplay is fun but coming up with lore and reasons for these areas/mechanics just makes me sleepy.
40 card deck size, the plugin seems more sluggish.
Village theme I composed for a commission!

Forum statistics

Threads
94,567
Messages
921,939
Members
124,430
Latest member
Venator123
Top