🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

UDP vs. TCP

Started by
0 comments, last by MadCow[an] 23 years, 11 months ago
I know that TCP involves establishing a connection between the two computers, and what is sent is pretty much guaranteed to be received at the other end. So what is the advantage in using UDP packets in multiplayer games which are unreliable? Does TCP require more bandwidth for error checking and acknowledgement etc.? Douglas Cowan
Advertisement
TCP requires acknowledment for every message sent. This is slower than UDP (also called reliable). UDP sends a message - if it gets there it gets there if not oh well. This is probably twice as fast as TCP.(No acknowledgment) also called unreliable. TCP does not require more bandwidth, just an entire extra acknowledgment message.

Also, most action network games will send update messages at some time interval...say every 50ms. If a message is lost, then the next message will carry the needed information anyway.

In short, the reliable TCP is slower and unneeded for most games, since they are updating very frequently anyway.

This topic is closed to new replies.

Advertisement