I'm trying to decide how to implement player movement in an MMORPG. Player positions must be synchronized in a way that meets the following requirements:
- Low lag
- Difficult to hack or cheat
- Authoritative server with constant accurate knowledge of player positions
- Fairly simple to implement
I already know of two approaches:
The client sends position: Every so often, the client sends the player's current position to the server. This is simplest.
The client sends input: Basically the player's machine sends keypresses to the server, and the server handles all simulation and state, sending back the player's position every so often.
Both systems have their advantages and disadvantages. Is either one superior to the other, or is there a better alternative?