Archived

This topic is now archived and is closed to further replies.

wrathgame

UDP reliable on local network ?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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

Share this post


Link to post
Share on other sites