I want to start writing a multiplayer 3D game. It will be a virtual world, that user are represented as players. Every player, is a 3D model. I’m going to write this in Java and JOGL, so it will be cross platform and accessible through the web (applet). The server, will be wrriten in C++.
When a user clicks with his mouse on some point in the virtual world, it will go to this point, in animation. My question is, should the client calculate to where to go, and send to the server his new position everytime, so the server will update the clients? Or, should the client just send the server to where he wants to go, and then the server will send to this clients and all clients his new position? Consider that I want minimal bandwidth and prevent script kiddies.
Thank you.
I believe the prevailing design is to assume on the client that an action will succeed and proceed with it, tell the server about what it has done, and allow the server to “correct” the client when it detects that it did something fishy. This keeps the game client responsive to the player’s requests, while still giving the server veto power.
Because the server is always the authority on the state of the world, and the other game clients will receive their information only through the server, any illegal actions by a client will always be caught by the server before they can ever possibly affect another player.