• Advertisement
Sign in to follow this  

Server load vers client load

This topic is 4009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
I would do the same logic on the client as on the server, but let the latter be authorative.

Share this post


Link to post
Share on other sites
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
Sign in to follow this  

  • Advertisement