MZ I HOPE SOME 1 CAN GIVE ME VERY SIMPLE ANSWER TO MY QUESTION

1) I have created Login form and Register form by using PHP
2) Lets say I have created MySQL database for my server also which have tables and other stuff to save player information

Q1) how to make login and register form show before the game start ? how to connect database exactly to game
Q2) when player save the game or exit the game or click alt f4 or click on x mark to close game, how to send data to my
MY SQL server database

I am not trying to make any MMO kind, I just want to get this things in my server so, Make new page leader board
and then use event to show it in game

so that even my game is offline and single player, the people can see around the world that they can see other people playing and they can compare there score with them

I search so many things on forum, I found so many things but so many things goes over my head, I just don't understand

I found one them have made plugin to do chatting , banking and other stuff

I don't need this. I want to make leader Board page that can show players

ranking on the gold they earn, then level who is high level, how many quest done by some 1, and etc...

I hope to find very simple solution rather than very complex things
Moved to: Plugin Requests

Please make your thread titles more meaningful - say what you want help with, rather than just "can someone give me help?"

This may be helpful to you.

This may be helpful to you.
thanks i go check it if, i can get some info
thanks i go check it if, i can get some info
i can make the database and and other stuff. login page that is not my problem
i just dont know what to type in plugin to connect it to database. and what to type in plugin to fetch information from database to show small table as leadershipbord
i can make the database and and other stuff. login page that is not my problem
i just dont know what to type in plugin to connect it to database. and what to type in plugin to fetch information from database to show small table as leadershipbord
The link I gave you tells you how to connect to a database and query it.
The link I gave you tells you how to connect to a database and query it.
thanks i go and check it out if it works 🙂
thanks i go check it if, i can get some info
hey i need your help
i try to use it but failed to write proper code in plugin js file, i check console it say i dont hv define this and that i m doomed

i have xampp runing and have my data base created

i paste my php file code that i use to connect database
please convert it to js plugin so i can use it in game thanks lot in advacne


<?php

$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ims";

$conn = mysqli_connect($servername,$username,$password,$dbname);

if($conn)
{
echo "";//("Connected Successfully");
}
else
{
echo ("Connection Failed" .mysqli_connect_error());
}

?>
Well, how do I say this... I think you're considerably underestimating the difficulty of this task. You will not be able to do that without learning some JavaScript. This system will need to do a lot more than just read from and write to a database.

In order to let the players register and login when the game starts you'll probably want to create a custom Scene to handle it. You'll need to program a way to display that leaderboard. You'll need to actually get the data that you want to send (like player gold etc.), which will likely require you to dig around the engine's code to find out where it's stored. None of these tasks are particularly difficult, but they're not easy either, and will require you to learn some JavaScript and at least somewhat familiarise yourself with the engine.

There's also the issue of database security. It's usually not a good idea to have client-side code interface with a database directly - all it takes is one malicious person to take that code, and slightly modify it to spam the database with thousands of fake entries. That is assuming you do have proper access controls; if you have players connected as root as the code you posted would imply, anyone will also be able to just delete the entire database.
The usual solution is to have the client send those scores to a server, which will then verify them (that they're not spam, and that they're possible to achieve and not just someone sending level:4294967296), and only then push them to the databse. Alternative use something like Firebase that can also handle this kind of store for you.

I hope you don't find this post too discouraging - it's cool that you learned how to use databases, and I believe you'll eventually be able to learn everything else you'll need too. Just understand that it will take a while.

For now I'd recommend checking out some JavaScript tutorials and trying to make very simple plugins. And keep working on your game - I'm assuming there's plenty to be done other than the leaderboard. Write simple plugins for your game. Try to make a system that keeps track of high-scores and displays them nicely (just offline for now). When you're ready, check out the resource Trihan linked to take that system online.
Well, how do I say this... I think you're considerably underestimating the difficulty of this task. You will not be able to do that without learning some JavaScript. This system will need to do a lot more than just read from and write to a database.

In order to let the players register and login when the game starts you'll probably want to create a custom Scene to handle it. You'll need to program a way to display that leaderboard. You'll need to actually get the data that you want to send (like player gold etc.), which will likely require you to dig around the engine's code to find out where it's stored. None of these tasks are particularly difficult, but they're not easy either, and will require you to learn some JavaScript and at least somewhat familiarise yourself with the engine.

There's also the issue of database security. It's usually not a good idea to have client-side code interface with a database directly - all it takes is one malicious person to take that code, and slightly modify it to spam the database with thousands of fake entries. That is assuming you do have proper access controls; if you have players connected as root as the code you posted would imply, anyone will also be able to just delete the entire database.
The usual solution is to have the client send those scores to a server, which will then verify them (that they're not spam, and that they're possible to achieve and not just someone sending level:4294967296), and only then push them to the databse. Alternative use something like Firebase that can also handle this kind of store for you.

I hope you don't find this post too discouraging - it's cool that you learned how to use databases, and I believe you'll eventually be able to learn everything else you'll need too. Just understand that it will take a while.

For now I'd recommend checking out some JavaScript tutorials and trying to make very simple plugins. And keep working on your game - I'm assuming there's plenty to be done other than the leaderboard. Write simple plugins for your game. Try to make a system that keeps track of high-scores and displays them nicely (just offline for now). When you're ready, check out the resource Trihan linked to take that system online.
I really appreciate you took some of your time to replay me, Thanks a lot bro. most of my game is already finished i mean if i leave the graphics out , my game have rpg and farming both mix up😛
like you can enjoy the farm life in the town for 3 season and in 4 winter season crops dont grow so you can go in to the fileds and do some hunting😛

now i am working on other land so player can go out of town 😛 i mean other island away from where player town is. 😛

i can do database stuff call it everythng in php, it just i am not able to make functions in js and pass arguments, i try to do it, but i got lots of time 1 or 2 eror and plugin never workd😛
it just i am not able to make functions in js and pass arguments
My point here is that generally the JavaScript piece of this problem will be the more difficult part. Hence the recommendation to start with some tutorials and simple plugins before tackling this.
My point here is that generally the JavaScript piece of this problem will be the more difficult part. Hence the recommendation to start with some tutorials and simple plugins before tackling this.
yes thank you :yhappy: i will check the tutorials on java script

Original thread: https://forums.rpgmakerweb.com/threads/i-hope-some-1-can-give-me-very-simple-answer-to-my-question.154263/