Quick MMORPG Question...

Started by
9 comments, last by hplus0603 18 years, 5 months ago
I know I've been asking a lot of questions about MMORPG development lately, but here's another one: When I want to have data from the client (for example, the player's level upon logout time) stored in my (SQL Server) database, should I have the client send it directly to the database, or should the client give it to the server and the server stores the data in the database?
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Advertisement
send it to the server. allowing direct access to the DB seems like a big no-no to me (for security reasons).
Neither actually.

The player shouldn't tell the server such game critical information; it should be the other way around. The server should tell the player it's level and such.

Otherwise, you open yourself up to hacks with a client sending the server "Oh, yeah, sure, I'm level 99 <<wink wink nudge nudge>>" when they actually aren't.

For more practical advice, see if you can dig up anything on "thin client" vs. "thick client". A thin client is what most every MMO follows, basically a dumb terminal that mrely processes the information the server sends. A thick client is what you propose, where you actually put game critical logic on the client and that is a big no-no for MMO development.

Remember this mantra when doing MMO development "The server is god; the clients are merely it's servants".
The client is basically a dumb side. The client knows nothing and says nothing to server. Every piece of valuable data (xp, items, whatever) should only be trusted if comes from server.
remeber the client is in the hands of the enemy.
But if the client never says anything, then how will the server know when, say, it has to update the player's location because the player clicked on the screen?
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Quote:Original post by programwizard
But if the client never says anything, then how will the server know when, say, it has to update the player's location because the player clicked on the screen?


The client can talk all it wants; just as long as the server checks that it's ok that the client can move, i.e. if they click on the square next to them, and when it's not, like when they want to teleport to the city eight miles away.
It only takes one mistake to wake up dead the next morning.
Basics of server-authoritative interaction:

The client clicks on the screen, and client software calculates "player wants to move to position X,Y". Client then runs pathfinding between current position and X,Y. If there is a path, client sends "move to X,Y" to the server.

Server, when receiving request, re-checks the request by running pathfinding again. If there's no path, then the command is denied. If there is a path, the server sends out "client C is now moving towards X,Y".

Repeat for every possible interaction your game might have.
enum Bool { True, False, FileNotFound };
K, I get the picture. I'll be using the keyboard to move in my game, but thanks!
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Quote:Original post by hplus0603
Basics of server-authoritative interaction:

The client clicks on the screen, and client software calculates "player wants to move to position X,Y". Client then runs pathfinding between current position and X,Y. If there is a path, client sends "move to X,Y" to the server.

Server, when receiving request, re-checks the request by running pathfinding again. If there's no path, then the command is denied. If there is a path, the server sends out "client C is now moving towards X,Y".

Repeat for every possible interaction your game might have.


Why not to also check in the server if there is a path?

This topic is closed to new replies.

Advertisement