Bradleat:But, about placing too much trust in the client what problems could arise from it.
Primarily, it's a security risk. The client is in the hands of the enemy. Even if you're absolutely 100% sure that your code doesn't lie, the client is not necessarily your code. It's an unknown person running unknown software that has connected to the port where your server listens, and you need to think about your system from that perspective. How do you verify that the software connecting to this port is, indeed, your code? Is it possible for someone to fake that? Keep in mind that the client has complete and total control over the physical topology of their network, and all the time in the world to analyse traffic.
Consider, for example, that your client only sends what it can guarantee. What if I tell the server something I want, but can't guarantee? Like, "player 5 is dead"?
Could that make everyone except player 5 think he's dead? Would it cause player 5's future updates to be ignored, because he's dead and hasn't respawned? Clearly, player 5 doesn't need to be told he's dead - the client handles that - so player 5 would be wandering around an empty map, because the server is waiting for player 5 to say "I have respawned"... which will never happen, because player 5's client doesn't know he's dead, and player 5 is also in the "who cares" state receiving the minimum number of updates. He basically has to kill himself to get out of it.
And if that works, why wouldn't I spam such messages for all the other players, so I could roam free through the map and pick up all the best goodies for a while? If I want to be more subtle, why wouldn't I store the player positions, send an "I am dead" message for all of them, and then send a respawn message at their last known location after I do something nasty? That would let me "glitch" the game for a couple seconds, long enough to grab something nearby, but the clients and server would recover - just like if there was lag - once I sent the respawns. It would look no different than a router rebooting somewhere on the subnet.
What if I sent a message that I am at this location right next to player 3, and then another that says I am firing a grenade in his general direction, and a third that says I'm back where I was? Did I just teleport into player 3's vicinity and drop a grenade in his face, then disappear before it blew up?
How does your protocol prevent these things? It's a major concern, and it needs to be covered.