Hello everyone!
I have some questions on what the best practice, of which I am sure there are many, on how to handle MMO communication from a design aspect.
Some details to start.
I have a MYSQL database able to store all my player information, and it is working.
I currently have player state storing the information on player stats (Health, mana, etc), and the scripts set up to execute on server at runtime to gather the stats from database, and replicate to the client.
I have been wondering if this is the best way to handle it.
There is something called game state and game instance, but I am confused on what to actually use it for, so maybe an example would help.
I haven’t ventured too far yet, and wanted to make sure I’m going in the correct direction.
I would like the server to receive the information from the database, store the information on the game server, have the player clients send back to the server for commands, then have the server check to make sure the player can do the action and so forth.
Basically, I am concerned the player disconnects, and the player state vanishes, and the players information is lost at disconnect.
I am aiming to have the server, send the player stat update that occurred on that session to the database only once, 30 seconds after log out or disconnect.
The question is, does player state continue to stay active once the player leaves the current session from log out or disconnect?
Thanks!