Original Post
I am working on adding network multiplayer to a simple 2d game I have created.
Currently I number all packets sent between the client and server. If we've received a more recent packet we dump the one we just received otherwise we analyze it. The problem is how do I know if a packet is old and because of lag I'm just receiving it? Is this something I should not be worried about because if I don't receive packets for about 1 second then I can start to just think the client is lost?
Up until this point I have not seen a need to know the actual time of a packet in relation to server time or vice verse but wondering if thats because I'm doing something wrong. Is there usually a time associated with a game state packet or is order all that matters?
Currently I number all packets sent between the client and server. If we've received a more recent packet we dump the one we just received otherwise we analyze it. The problem is how do I know if a packet is old and because of lag I'm just receiving it? Is this something I should not be worried about because if I don't receive packets for about 1 second then I can start to just think the client is lost?
Up until this point I have not seen a need to know the actual time of a packet in relation to server time or vice verse but wondering if thats because I'm doing something wrong. Is there usually a time associated with a game state packet or is order all that matters?