07-03-2007, 09:58 PM
I don't know where I read this, or if it's even on this forums. All I know is that, I got the idea to try and mix the two up. I've gotten some comparisons and reading done. I know it's been done, for the article I read on it said so, but I want to try and implement that onto MS.
I'm sure, by now, we all know the difference between TCP and UDP. TCP being reliable but slow, and UDP being unreliable but fast. But for those who don't know why, here are the comparisons taken from Wikipedia:
The idea of using UDP to replace TCP is insane! But, using UDP to send packets that don't really matter as much, might be a better approach at making a faster game, reducing the 'stream', as it's refered to, of data.
I am currently working on research and seeing if it could even be done to Visual Basic. It should, so, using it for MS would help, no? Especially for things like player movement.
Anyways, keep checking back. I will be updating this post with my finds, and if I fully implement it, I will be updating with the code.
Thank you guys for reading! I hope this helped some of you understand UDP better, and also understand TCP as well!
I'm sure, by now, we all know the difference between TCP and UDP. TCP being reliable but slow, and UDP being unreliable but fast. But for those who don't know why, here are the comparisons taken from Wikipedia:
Quote:Difference between TCP and UDP
TCP is a connection-oriented protocol, a connection can be made from client to server, and from then on any data can be sent along that connection.
Reliable - when you send a message along a TCP socket, you know it will get there unless the connection fails completely. If it gets lost along the way, the server will re-request the lost part. This means complete integrity; things don't get corrupted.
Ordered - if you send two messages along a connection, one after the other, you know the first message will get there first. You don't have to worry about data arriving in the wrong order.
Heavyweight - when the low level parts of the TCP "stream" arrive in the wrong order, resend requests have to be sent, and all the out of sequence parts have to be put back together, so requires a bit of work to piece together.
Streaming - Data is read as a "stream," with nothing distinguishing where one packet ends and another begins. May be multiple packets per read call.
UDP is a simpler message-based connectionless protocol. With UDP you send messages(packets) across the network in chunks.
Unreliable - When you send a message, you don't know if it'll get there, it could get lost along the way.
Not ordered - If you send two messages out, you don't know what order they'll arrive in.
Lightweight - No ordering of messages, no tracking connections, etc. It's just "fire and forget"! This means it's a lot quicker, and the network card / OS have to do very little work to translate the data back from the packets.
Datagrams - Packets are sent individually and are guaranteed to be whole if they arrive. One packet per one read call.
The idea of using UDP to replace TCP is insane! But, using UDP to send packets that don't really matter as much, might be a better approach at making a faster game, reducing the 'stream', as it's refered to, of data.
I am currently working on research and seeing if it could even be done to Visual Basic. It should, so, using it for MS would help, no? Especially for things like player movement.
Anyways, keep checking back. I will be updating this post with my finds, and if I fully implement it, I will be updating with the code.
Thank you guys for reading! I hope this helped some of you understand UDP better, and also understand TCP as well!
