🎉 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 reliable on local network ?

Started by
1 comment, last by wrathgame 22 years, 11 months ago
Hi all, Im writing an MMORPG style game and have a couple of questions about UDP... 1) is UDP 100% reliable over a local network (rather than the internet) - I ask this because im thinking of spliting each game World onto about 2 or 3 computers and I was hoping to broadcast shared world data as it changes to all 3 computers (one being the "controlling" computer). This was kind of asked in the worms post about TCP/UDP but I didnt see an answer for that part. 2) When i do use a reliable form of UDP (ie sending an acnolegment) is it any faster than using TCP ? or would it be best to have a TCP connection for reliable packets and use UDP for unreliable ? any help or advice would be great Thanks Tim
~ Tim
Advertisement
From my own experience LANs are not reliable and sometimes predictably so. I''ve had experiences where I would consistantly lose the same parts of the map. You''ll still need to guarentee packets for important information.

If you''re not sure which is faster it''s probably best to just code all ways and see what works and what doesn''t.

Ben

Jump Down The Rabbithole
I agree. In my experience UDP on a LAN is not reliable enough - very reliable, but not perfect.

As far as writing your own "reliability" layer over UDP compared with TCP, I guess it depends... I would say if you''re going to be exclusively on a LAN, TCP will be speedy fast because TCP works very well in the non-error state (which will be 99.9% of the time on a LAN). If you''re planning on venturing off the LAN and onto the Internet (modems, too), then you might want to think about writing your own. Think of you web browser (TCP) as an example. It does its DARNDEST to get that web page data, but with the tuning mechanism of TCP (not programaically tuneable), it can take a very long time. If you need precise control on your tuning during error conditions (I.E. need to quickly assess and fix or abort the problem as is often the case for games), you may very well be better off writing your own. That''s what I did. But for God''s sake, if tuning during error conditions is NOT time critical for you, by all means use TCP. It''s tried and true.

Cheers!
-B

This topic is closed to new replies.

Advertisement