Sending reliable USP packets?
I realise that UDP is the way to go when it comes to games. But UDP is not reliable -> packetloss.
Thats ok when it comes to player movement etc, coz that doesnt have to be recieved all the time, but what about key packets which must be sent successfully ? Is there a better, foolproof way to ensure a packet gets there, than resending it a given number of times ?
March 13, 2002 03:48 PM
quote: Original post by Tylon
I realise that UDP is the way to go when it comes to games. But UDP is not reliable -> packetloss.
Thats ok when it comes to player movement etc, coz that doesnt have to be recieved all the time, but what about key packets which must be sent successfully ? Is there a better, foolproof way to ensure a packet gets there, than resending it a given number of times ?
Mark your must have packets. Then have the opposite end send an acknowledgement when it''s recieved. Keep resending until you get back an ack. On the other end, just keep acking if you get duplicate packets.
This is the most common way to handle reliable communications.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement