Sign in to follow this  
BladeStone

Server load vers client load

Recommended Posts

BladeStone    100
I've been writing an small on-line RPG for a while now and I'm getting into learning to do the server/client coding. I was deciding what the server or client processed, and it turns out that to keep the characters safe from being hacked, I stuffed all the fighting and items and everything process-wise over on sever,and the client does the command input and all the preaty stuff (graphics & sound) based on the out come from the server. Is this bad design?

Share this post


Link to post
Share on other sites
UNiSOL    122
No, this is the way i would do it.

Assume the client is evil.

If they can exploit something, they will, unfortunately. Don't give them the chance.

The client requests an action, if they CAN perform the action, the server processes and updates the entity/actor on the other clients, with the appropriate action.

Share this post


Link to post
Share on other sites
Bob Janova    769
The server should do everything that affects the game (i.e. not purely graphical particle effects and animations). You can have the client do them as well, to hide the round trip latency, but the server always 'wins' if there's a disagreement about what happened.

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