Jump to content
Jade Shadows: Share Bug Reports and Feedback Here! ×

Switch Udp To Tcp


Keetsune
 Share

Recommended Posts

@Chereazi

I hope trolling as well. That or Keetsune just learned some buzzwords and decided that one was better than the other and is trying to push that in a lot of places.

That or they mixed up TCP and UDP and wont listen to us trying to explain the actual meaning and uses behind each protocol.

Each situation determines which one is better suited, as you said.

UDP is great if you want something a lot closer to real time, such as action genre video games.

TCP is great if you want something that is more reliable to get all of the information across and time isn't as important, such as larger file downloads.

Each has their place, each has their uses.

If this game was turn based, or a strategy game where the action was slow and delays were acceptable then TCP would be viable.

As that isn't the case and this is a very fast paced game TCP just isn't viable.

Edited by Tsukinoki
Link to comment
Share on other sites

Someone probably got their hands on a Network+ book and read up a bit about different protocols.  Must have missed the part where UDP is used to transport voice and video due to it's speed, same as gaming (which is never mentioned in Cisco curriculum, makes me sad).

Link to comment
Share on other sites

@Bakercompany86

Really the only games that could get away with using TCP are turn based games of some sort. Beyond that though...

Correct.  TCP is not a valid protocol for gaming.  Checksum, sequence numbers, ack numbers, TCP handshake....all add network latency.  Games need their data and they need it NOW.  Nobody cares if an email takes a second longer due to TCP.  Voice, Video, and Games however, the difference is more than noticeable. 

Link to comment
Share on other sites

@Bakercompany86

I live in that world and have coded applications that use both protocols. It really depends on what your using and how important the information getting there all in one piece and verified versus how important it is getting the information over there NOW.

If you care about data integrity as the biggest thing then use TCP.

If you need speed then use UDP.

Games like this require speed more than integrity because what happened a few seconds ago is now invalid and doesnt matter at all.

Link to comment
Share on other sites

@Bakercompany86

I live in that world and have coded applications that use both protocols. It really depends on what your using and how important the information getting there all in one piece and verified versus how important it is getting the information over there NOW.

If you care about data integrity as the biggest thing then use TCP.

If you need speed then use UDP.

Games like this require speed more than integrity because what happened a few seconds ago is now invalid and doesnt matter at all.

Correct.  TCP sends an acknowledgement of every packet sent, and checks the packets integrity upon arrival.  Then using the sequence numbers, the string is reassembled at the other end.  Not to mention the greater size of the TCP header over the UDP header.

UDP is source, dest, length, and checksum....that's it.  Nice and fast, if unreliable.

Link to comment
Share on other sites

@Bakercompany86

Really the only "advantage" that TCP has over UDP is that in TCP a lot of things such as packet size, buffering, chunking, verifying and all that is handled automatically. While in UDP you need to handle a lot more of that yourself. But that's the trade-off you pay for in order to get the speed you need.

And even then, if you know what you are doing that "advantage" is rather small. Especially when you begin to consider the overhead that TCP puts on everything.

Link to comment
Share on other sites

You use TCP when you need reliability.  You use UDP when you need speed.

 

TCP is a connection-oriented protocol, UDP is connectionless.

 

They're both useful, just for different applications.  TCP is vastly more reliable than UDP.  Without TCP we wouldn't be able to have thousands of FTP connections we have every day at my company.

Link to comment
Share on other sites

Tsukinoki has explained the differences in protocols better and in a comprehensive yet easy to understand post - thank you sir.

 

The thread starter on the other hand has proven himself to have absolutely no idea of what he's talking about, a poor attempt at spineless trolling ("I would do that with pleasure cause i can"...wat), because if he actually did, he'd surely have already explained it like Tsukinoki did, yes?

Link to comment
Share on other sites

i almost play solo because i use a connection which you can call  "modern dial-up connection" to play this game.

 

In game i only see my teammates "teleport" arround the map and in defence mission i only stay there watch BOT "auto die" then end wave and finish the game.

 

but sometime i have left behind the door because it open haft or not open with me but all my teammates can get through it. So back to TCP-UDP in this game this mean some packet like "open the door" had been lost completely(atleast with me) because that i suggest there some stuff should be send with TCP like open door or something like that and other stuff just keep UDP.

 

PS: sorry my bad English.

Edited by legionufo
Link to comment
Share on other sites

@legionufo

On the surface, this seems like a great idea. The problem is that since TCP and UDP are both built on top of IP, the underlying packets sent by each protocol will affect each other. Exactly how they affect each other is quite complicated and relates to how TCP performs reliability and flow control, but fundamentally you should remember that TCP tends to induce packet loss in UDP packets. As the packet loss and latency goes up, so does the lag and other issues you wanted to avoid by using UDP.

And what you're seeing is mostly caused by poor connections as you've deduced. Your connection is poor enough that your computer isn't getting the full state updates of "This door is now opening" and "This door is now closing" and all of that.

But mixing the protocols wont solve any of the issues and will make quite a few things worse actually.

Im sorry to say it but there is no easy solution to what your seeing besides upgrading your connection.

Edited by Tsukinoki
Link to comment
Share on other sites

reason for using UDP is because their is drastically less latency due to no error checking.  Try streaming 1080p video with 10.1 surround sound to 3 different people using your home internet.  Wouldn't work too well, would it?

Only the chat is running in UDP, the game is TCP - there's no reason to fear latency issues in chat.

Link to comment
Share on other sites

@magusat999

The game is running off of UDP, not TCP.

If it was running off of TCP the game would lag a hell of a lot more than it does currently.

TCP is not meant for real time updates, such as voice, video, or gaming.

UDP is meant for those sorts of connections that need to be much more real time.

That is why the game has you forward the UDP ports, so that it can use them to actually play the game. It would be pretty impossible to play a real time FPS game that used TCP.

Edited by Tsukinoki
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...