🎉 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!

TCP or UDP?

Started by
1 comment, last by TUna 23 years, 7 months ago
Awhile back everybody used UDP because it was faster, now I hear that Halflife uses TCP? How much slower is TCP over UDP? If TCP runs Halflife without any problems surely it is the better protocol to use as you don''t have to worry about lost packets and packets arriving out of order? Or were the Halflife coders just lucky?
Advertisement
Last time I checked Half-Life uses UDP over the net, I half a UDP proxy to grab packets from games like that, I wrote it to help me understand the Quakeworld protocol to write a proxy for it. I could use it to dump HL packets also.
It would be real odd if Halflife used TCP as it is built on the Quake2 engine which uses UDP. The thing that would make TCP bad for these kinds of games is that the error checking/correction mechanism is slow and can lock the connection for over a minute when a packet is dropped. TCP also has longer headers than UDP, forcing you to cut down on the data you want to transfer.

Henry

This topic is closed to new replies.

Advertisement