Online Highscores

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
DMV Online Highscores
By Dekita



Introduction:

This system allows unlimited online highscore lists to be within your game. These lists can be ordered a number of ways. There isnt really much to say on what this does, cause I am fairly sure everyone knows what an online highscore list is... If you dont, this tpic really is not for you I'm afraid.

Features:

  • Unlimited Online Highscore Lists
  • Comes With Both The Client && Server Side Code
  • Uses POST Requests To Protect Against Internal System Structure Being Publicly Visible
  • Simple REST-like structure for the system (although its never seen due to using POST)
  • Simple SQL Injection Protection

How To Use:

I wrote a lengthy tutorial that is visible immediately from the download link. I dont intend to reiterate that information here.

Download:

HERE:

Dependencies:


FAQ:

None yet, but if I get any, they will also be added into the tutorial page.

Credits:

Dekita (www.dekyde.com)

Notes:

This system is not really 'newb-friendly'. It requires use of web servers, php, mysql and also, editing of the plugin javascript file. If you are new to these things, I would recommend you either get a friend who knows how to setup the system to help you, or begin reading a lot of the available information online regarding obtaining a server with php and mysql enabled on it.
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thank you. I don't have quite a use for this later but maybe I can do it for different things like how many times someone caught a fish or mined something :)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
Loads of things could be done... Storing a list of the people who beat each stage in your game for example - to get some in game analytics of how folk play your game. Maybe keep a record of who had the most gold after boss 5, or maybe there is a maze challenge - why not store the results of who was fastest. :)
 

Galenmereth

I thought what I'd do was
Veteran
Joined
May 15, 2013
Messages
2,207
Reaction score
1,928
First Language
English
Primarily Uses
RMMV
Does this implement SSL? If not, POST isn't really any more secure than a simple GET, and packet sniffing is super easy to perform to read the data structure being sent :)
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
SSL is something that would be implemented by the web server directly. You would just change the host path from http:// to https:// and it would perform a secure connection. :)
 

Galenmereth

I thought what I'd do was
Veteran
Joined
May 15, 2013
Messages
2,207
Reaction score
1,928
First Language
English
Primarily Uses
RMMV
Are you sure that would work if MV is running locally though? The reason SSL is automatic on a server on hosted sites is because both are on a secure domain; the local environment is not by default secure in MV's node implementation.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
I had not considered that to be honest - I dont have https atm, so couldnt even check it properly in that regard. I will take a look into it some more, but from the initial searching, node does support https, and also the creating of https servers from within the client. So I dont think it would be that much of an issue either way :)

On a side note: My extensive online research has led me to this statement...

Just to be absolutely unambiguous; XML HTTP requests work over https
exactly as they do over http. If they did not our QA department would
have said something by now as they test over https almost exclusively,
and our web applications use web services (and so XML HTTP requests) so
extensively that they would not do much if they did not work.
 
Last edited by a moderator:

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,297
Reaction score
7,876
First Language
English
Primarily Uses
RMMV
Here's a screenshot of the system in action!

While I had some help (okay, okay, Dekita did it all for me :p ), setting up the lists is pretty easy (IF you read the info on the download link) and the commands are super simple to use.

If you're a newb to the server stuff like me, don't let it intimidate you - I'm sure there are plenty of people around here willing to help.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
You just have to multiply your value by the value held within the config manager.. eg: 

ConfigManager.difficultySo in the end, your highscore list customization section would look something like this:

Code:
    "Example": {       head: 'Example List Header',      posi: default_position,      post: {        sname: default_scorename,        score: "$gameVariables.value(1) * (ConfigManager.difficulty+1)",        extra: "''",      },    },
 

hardqueen

Crazy Talker
Veteran
Joined
Oct 26, 2015
Messages
78
Reaction score
15
First Language
Chinese
Can I use my own custom online server?
 

Helyx

Villager
Member
Joined
Oct 12, 2015
Messages
20
Reaction score
2
First Language
French
Thank you a lot, I'll test that as soon as possible :)
 

azrail13

Warper
Member
Joined
Jan 22, 2014
Messages
2
Reaction score
0
First Language
English
Primarily Uses
I keep getting a "Loading..." window after uploading a deployed version. Then I got it to work, but it just looked like it returned squished text. I assume it's an error of some sort.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
If you are seeing 'squished text', then yes, you are receiving incorrect data back from the request you are sending. :)


I can assure you though, this system works perfectly fine. I've been using similar server side code for years for vx ace.


Sorry for late reply.
 

Kojote

Villager
Member
Joined
Aug 25, 2014
Messages
15
Reaction score
1
Primarily Uses
Hello!

I tried to install the plugin. Unfortunately, it failed already at the point:


Adding A New Highscore List - Step 1: Creating The Database Table

Could you again explain in more detail how I have to do this step? Since I did not know myself what else to do, I have to now have step by step 'highlist1' copied to a separate table.

Get now but in the browser always the error message: List Id Given What Invalid !!

Even when calling about the RPG Maker MV is applied on my server an error file. Line 83 of api.php - List Id Given What Invalid !!.

Can you help me?


Sorry for my english is not my native language. ^^


 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
That error message is being received because you are sending an invalid list identifier from rpg maker to your game server.


I can see in your client configuration file, that you are wanting to view a list for hammer_man. But hammer_man is not a valid list identifier. It is however, a valid database table name.


Within your mv configuration file, your highscore list setup should look like this:


//
// List Identifier: HammerManList
//
"HammerManList": {
head: 'My Custom Text',
posi: default_position,
post: {
sname: default_scorename,
score: "$gameVariables.value(10)",
extra: "''",
},
},


Then, within the listKustomization.php file, you setup the $listSettings identifier for HammerManList, like so:


$listSettings["HammerManList"]["name"] = "hammer_man";
$listSettings["HammerManList"]["type"] = "A";
$listSettings["HammerManList"]["show"] = 999;




Basically, everything you done was correct, except you were using the database table name from within the mv plugin file - where you should have been using 'DefaultList4', or set it to be more unique, like i have demonstrated above.


I hope this helps you and you are able to get your games highscore list working now. :D
 

Kojote

Villager
Member
Joined
Aug 25, 2014
Messages
15
Reaction score
1
Primarily Uses
Hello and once Thanks for the reply.


I have now set everything as you have given it, but it does not work unfortunately. To control I put again at my settings.


As a side question, my domain would be: https://fenrir-spieleschmiede.de


A subdomain I use: http://hammer-man.fenrir-spieleschmiede.de


The address is thus a subdomain and only this main domain has SSL encryption, here is possibly the problem?


(Edith: I believe it is not. It was tested now under a domain and without SSL, the problem remains, unfortunately, exist.)



Under the link api.php I still get a: "List Id Given Was Invalid!!"


[17-Jun-2016 11:30:04 GMT] PHP Notice:  Undefined variable: dekList in /home/XYZ/ABC/api.php on line 83


In Maker MV does not respond to the plug-in-command: highscore view HammerManList
 


Other lists such as: highscore view highlist1
Can I otherwise do not call.



Did you have any idea what it could be?


Edith:


I'm not sure whether or not reference is helpful, I once commented to the query row 83 and now comes a new problem: "There was an error running the query []


[17-Jun-2016 14:50:15 GMT] PHP Notice:  Undefined index:  in /home/XYZ/ABC/api.php on line 86
[17-Jun-2016 14:50:15 GMT] PHP Notice:  Undefined variable: dekVerb in /home/XYZ/ABC/api.php on line 93
[17-Jun-2016 14:50:15 GMT] PHP Notice:  Undefined variable: dekVerb in /home/XYZ/ABC/api.php on line 94
[17-Jun-2016 14:50:15 GMT] PHP Notice:  Undefined variable: sqlQuery in /home/XYZ/ABC/api.php on line 103
[17-Jun-2016 14:50:15 GMT] PHP Warning:  mysqli::query(): Empty query in /home/XYZ/ABC/api.php on line 103


Problem_Highscore_2.jpg
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
I assume you have also set the sql database settings in the file for that?


It seems that somehow variables arent being defined that should be.. I have never had anyone complain about this issue before. :(


If you can upload a demo project for me, ill happily take a quick look at it and see if i can find any faults in the setup. :)
 

Kojote

Villager
Member
Joined
Aug 25, 2014
Messages
15
Reaction score
1
Primarily Uses
Excuse me the trouble and thanks for the help. I send them the project in a few minutes via PM.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

My first Video Scene - Kraken Art By @whtdragon -

Still needs work but its a start.
Considering a side project of making a Choose Your Own Adventure in MV but letting people play it as YouTube videos with the choices at the end leading to other videos. Thoughts?
I've made a rudimentary prototype map for the first game with the MV RTP overworld tiling. I'm probably going to photoshop the crap out of it for parallax, but the prototype has given me new ideas about how I want to place dungeons in the game.
I got tired of not having an avatar image. Couldn't think of anything cool. So I'm just using my game's antagonist instead... How original. At least both of our names start with C?
Expectation: Design/dev a game for the game jam | Reality: "These codes suck, why did I do it this way? lemme fix this. Also what if I add feature xyz because... well, I can."

Forum statistics

Threads
95,635
Messages
930,607
Members
125,950
Latest member
Tocilux
Top