Quote Originally Posted by laggyluk View Post
Anyone has experience with lnet library and udp?
No I'm afraid that I don't have direct expirience with mentioned library.

Quote Originally Posted by laggyluk View Post
Now, every frame input state is sent to server. I'm pretty sure I should drop packets that are older than last one received.
If as an input state you mean which keys are pressed and mouse position then you definitly should not drop any packets. Droping packets in such scenario could lead to dropping information about player pressing certain button which would afect actor movment and its actions.
For instance: Player presses Left arrow button three times which is sent to server by three seperate packets and you discard one becouse newer packet has arrived before older was processed. This would result in server registering only two Left arrow key presses instead of three.
But if you are sending current state (actor position, actor actions, etc.) then you probably might get away with dropping of packets as you only require newest game state.

Also if you are using sending input states to server using of UDP might not be best idea. Why? UDP protocol does't have packet deliver confirmation system built in like TCP/ip does. So it is posible that some UDP packets get los or damaged in transit. This could lead to unexpected behavior.
So for sending input states it would be better to use TCP/IP becouse the built in delivery confirmation system will make sure that the packet is delivered intact (the packet will be automatically resent if necessary) and finally it will raise error message if the packet can't be sucsessfully delivered. And yes becouse of this delivery confrimation system TCP/IP does require more network bandwich.

I have seen a few games which actually use combination of both TCP/IP and UDP at the same time. Most data is sent through UDP to lower network bandwich. But at regular intervals whose purpose is for clinet/server synchronization they use TCP/IP becouse with it they can verify that data reached all clients sucsessfully.