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

  • Cae_ScoreTable.js
    29.3 KB · Views: 1

JDevain

Veteran
Veteran
Joined
Oct 21, 2018
Messages
163
Reaction score
76
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
2,481
Reaction score
1,870
First Language
EN
Primarily Uses
RMMZ
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 :)
 

Latest Threads

Latest Posts

Latest Profile Posts

I wish character bust packs had options for both side-facing and front-facing for the same characters.
Looks like I'm going to have to cancel another game.
For now it is in testing phase: Changing the game icon from Rm2k/2k3 without needing to edit the executable.
Rm2k-DinChangeIcon.png
When there's a will, there's a lifehack. :ninja:

Before i mess with battle UI further, does it look decent enough? :hswt:

Forum statistics

Threads
112,528
Messages
1,068,968
Members
146,211
Latest member
Qushy
Top