- Btcc22
- |
- Exalted Legendary Member
- gamertag: Btcc22
- user homepage:
Everything on the Internet is at the mercy of packet loss, however, TCP is a reliable protocol or in other words, it has been designed to detect and deal with packet loss. However, this protection comes at the price of higher overheads and slower response times (packets require acknowledgements to confirm receipt).
UDP doesn't have any mechanisms to detect and correct loss and as such has lower overhead and superior response times thus making it highly preferable for certain genres of games (FPS, racing etc).
1) Only if it's too slow to sustain the bandwidth required to send/receive the packets, usually. Packets can be lost en route though and with a congested ISP, UDP is going to be the first to take the hit unless they're given priority. My last ISP had ~50% UDP loss during the evenings thanks to incredible congestion.
2) Yes but these games would likely perform even worse on TCP anyway. Resending packets is of no use when their contents are irrelevant to the current state of the game. Ever played a TCP game such as WoW where everything appears to freeze for a while and then suddenly runs at super-speed? That's TCP catching up with a backlog of packets. Rather than simply ignore lost data and start receiving up to date information as you would with UDP, TCP essentially stops processing newer packets in favour of receiving older packets and processing them first. This can't be helped by developers who choose to use TCP since it's implemented at the protocol level.
3) Yes but you'll end up being disconnected if packets are dropped and they can't be retransmitted before the connection times out. See above. :D
Probably more than you wanted to know but hey.
[Edited on 04.15.2011 12:19 PM PDT]