[MUD-Dev] UDP vs TCP for MUD/MMORPG project.

William wdaskalu at uoguelph.ca
Sun May 11 22:45:06 CEST 2003


> I was planning to do it using UDP... My justification for using UDP
> is that it requires less resources than TCP. I can have one open
> port recieving message packets, and don't need to maintain a
> continuous connection, even when the user is doing nothing.

It may appear UDP uses fewer resources to begin with, but you
are not guaranteed that a client's UDP packet will arrive at
your server.  You will need to implement a sequence
numbering scheme with notification of receipt to guarantee
arrival, as well as detection for when a client has unexplicably
 stopped sending packets.  The end result is that you are just
transforming UDP into TCP, and what you save in terms of
system resources, you will pay for in code complexity.

UDP can  also lead to the possibility of players 'spoofing' each
others' UDP packets to control each other in battles.   I don't
want to be scare-mongering about UDP, but in my opinion
it is best left to short one-time transmissions such as instant
messaging or transmitting data that will be continuously updated
and re-transmitted, such as real-time multiplayer gaming.

William

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list