Skip to main content
gamedev.net
🔒 Locked

Server load vers client load

Started by BladeStone 3 replies 900+ views
Original Post
BladeStone
BladeStone
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?
BladeStoneOwner, WolfCrown.com
UNiSOL
UNiSOL
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.
SymLinked
SymLinked
I would do the same logic on the client as on the server, but let the latter be authorative.
Bob Janova
Bob Janova
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.
BladeStone
BladeStone
Nice, that puts my worry to rest. Thank you
BladeStoneOwner, WolfCrown.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.