Sign in to follow this  
programwizard

Quick MMORPG Question...

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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".

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Quote:
Original post by rogerdv

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


That's what I meant with this part:

Quote:
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".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this