I am trying to get networking working for my game, I've read several sources of information about this subject but one thing is still unclear for me.
The way I process client input is by executing a command bound to that input, for example:
Player presses D -> MoveLeftCommand gets executed which applies a linear impulse to the body of the player.
Since the server codebase and client codebase are almost the same I just reference the commands by bytes, MoveLeftCommand is for example byte 1.
What I have now is when the player presses D it sends the byte of the MoveLeftCommand to the server and the server executes this on the specified entity. I don't believe this is right though since the client will have to send 60 packets per second to the server just to move. It is no problem just send a JumpCommand, this command will get executed once. But I think there is another way to send position.
My question is: what is the common way to send input from a client to a server? I have read about 'sanity checks' on servers but I don't now what is meant by that. Should I do something with client time?
Thanks in advance!