GNet Proper Practices?

BlitzMax Forums/BlitzMax Programming/GNet Proper Practices?

For movement, when the player wants to do something, the client should let them. If later the server says no, then the client should warp back.

If the server says yes, then they should be fine. The server should not have to send out their absolute position.

Think of it like this:

The client says I am this location, my heading is this, I am moving at this velocity, etc...

The server says OK, go ahead. Now the server knows that players last position, heading, and velocity. With a rough idea of ping times between the two, the server can take a good guess at where the player actually is knowing how long they have been moving forward already.

When the player wants to turn right, they send another packet, I am this location, my heading is this, I am moving at this velocity, I am turning to the right at this rate, etc...

The server should allow any move that is within reaosn and should be making sanity checks to make sure the player is not cheating. When the server receives a player move packet, it should check current location in memory against the location the player says he is at now, and do some simple math of how long since the last packet to determine if the amount of distance the player is reporting is possible or not within reason. If it isn't, then the server should send a packet saying No, you are here, this is your heading, this is your velocity, etc, and the client MUST obey.