Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

High-score website

Hi. I'm new to web programming, and I need some help.
What I'm trying to do is: have a website with high-score for my rmxp game,
and have RMXP "post" a score in it.

But, Where in a website can I save the high-scores?
I was told there's no 'memory' in web programing.
I'm not asking for you to do it for me, but tell me what I need to learn to get it done. MYSQL & ftp come to mind, but I'm not sure what they do exactly..
Thanks for taking the time to help a web-programing n00b like me. :p
 

Faint

Member

What do you mean exactly is:

When you finished the game on RMXP, the highscore will be posted automatically on your website.
If so:

You will need a MySQL database, and use it in RMPX and on your website. If you want this let someone make it for you or learn MySQL or RGSS. If you use MySQL, do it like this.
Create a database and create a table. Create a RGSS script: When you finished the game it will get the highscore information and put it in your MySQL database/table as a query and you load the data on your website. That's how it is. (Simple explained, you will need alot of code.) Correct me if I'm wrong people.
 
Thanks for the help.
Now I'll know what to ask/google :)
MYSQL is a table of values which is hosted by a server, right? (note to self: google MYSQL hosting, tutorial)
How can Ruby communicate with MYSQL ? I don't suppose there's a certain library for it..?
 

Faint

Member

I'm not really known with connecting RGSS to MYSQL, you could take a look at netplay and see how they did it.
I think you will have to code alot, but I don't know. It could be simple to.
 
Thanks again, but I think that can be done by a server-side script, correct me if I'm wrong:
1. have a form on my page, for inserting the score-
Code:
<form action="some_program" method="form"> 

score: <input type="text" name="new_score">

<input type=submit>

</form>
2. Have rmxp open the url equal to "www.mywebsite/new_score=" + $game_player.score.to_s
3. Add a hidden form value to make it secure. Or, is it a lost case when using GET?
4. Have the above program add the score to MYSQL, if it's a 'high score'.
 

Faint

Member

GET isn't very secure, the best thing is to put the score of the user in a MySQL database, and load it from there in your website. I also think that's the simplest way.
 
Two ways to do it:

1. Plug a MySQL script into your game (search this forum for MySQL) and connect that to a MySQL database

- insecure as if they decrypt your game they have the database password

2. Plug the socket classes from Netplay into your game, run a server on an external machine, and have that connect to the MySQL database (resource intensive).
 

Faint

Member

2. Plug the socket classes from Netplay into your game, run a server on an external machine, and have that connect to the MySQL database (resource intensive).

That's a good idea. I didn't thought of that yet.
You will need a good 24/7 computer for that. Or just rent a server.
 
Commodore Whynot":u70vl5wf said:
2. Plug the socket classes from Netplay into your game, run a server on an external machine, and have that connect to the MySQL database (resource intensive).
Sadly, using Netplay scripts is not an option, as my scripts aren't SDK compatible. Also, I won't rent a server just for this..
Commodore Whynot":u70vl5wf said:
1. Plug a MySQL script into your game (search this forum for MySQL) and connect that to a MySQL database

- insecure as if they decrypt your game they have the database password
So that's how you use MYSQL with Ruby! Sounds perfect for my needs, as I can't see anyone decrypting my game, first game and all.
Thanks a lot both of you ^^
balloon4.png
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top