TCP vs UDP, the question on netcoding - http://www.mmcafe.com/ Forums


Original message (2569 Views )

Professor
3668th Post



user profileedit/delete message

MMCafe Owner


"TCP vs UDP, the question on netcoding" , posted Fri 1 Mar 10:47:post reply

I know there's some programmers around this BBS who can probably share some knowledge. It's just a weird thought that popped into my head as of recent.

For online games-- fighting games in particular, how much difference would a TCP and UDP connection make in comparison to each other? I'm assuming TCP is at least twice as slow since it sends data and waits for ACK while UDP is pretty much one-sided. Of course things are probably not as that simple and there's some interesting readings.

The difference between some netcodes are quite extraordinary. My connections to local players are around 20-40ms, and it definitely feels that way with Skullgirls but almost 3 times as slow with say, KOF13. It makes me wonder if the game is running on TCP. IIRC, its GameSynchSoftwares netcode middleware is outdated material that hasn't really been revamped from the PS2 era, so I wouldn't be too surprised.





[this message was edited by Professor on Fri 1 Mar 10:59]

Replies:

sabo10
1430th Post



user profileedit/delete message

Red Carpet Executive Member




"Re(1):TCP vs UDP, the question on netcoding" , posted Fri 1 Mar 19:02post reply

The general consensus is that TCP is "for fags."

quote:
I know there's some programmers around this BBS who can probably share some knowledge. It's just a weird thought that popped into my head as of recent.

For online games-- fighting games in particular, how much difference would a TCP and UDP connection make in comparison to each other? I'm assuming TCP is at least twice as slow since it sends data and waits for ACK while UDP is pretty much one-sided. Of course things are probably not as that simple and there's some interesting readings.

The difference between some netcodes are quite extraordinary. My connections to local players are around 20-40ms, and it definitely feels that way with Skullgirls but almost 3 times as slow with say, KOF13. It makes me wonder if the game is running on TCP. IIRC, its GameSynchSoftwares netcode middleware is outdated material that hasn't really been revamped from the PS2 era, so I wouldn't be too surprised.







Spoon
2394th Post



user profileedit/delete message

Platinum Carpet V.I.P- Board Master





"Re(2):TCP vs UDP, the question on netcoding" , posted Tue 5 Mar 08:53post reply

If they are using TCP, then their line of thinking is probably to take advantage of the packet acknowledgement and use that to synchronize machine state, and consequently synch frames to packets, resulting in the gameplay running at the speed of the slowest packets. This is how the old GGX#R netplay worked on PC, and led to hilarious lag tactics since you had more time to react to things that even SSF2. Sol could DP pokes. It was bananas. UDP requires quite a bit of work on top of it, since its unreliable nature means all kinds of crap can happen that you need to devise handling for, especially if the goal is for a seemingly lag-free experience. TCP gives you guaranteed synchronization for almost no work, but you are almost guaranteed to have sluggish gameplay.

Mauve, the guy who was behind the retooling of netplay for melty blood, akatsuki blitzkampf, and IaMP, has some things to say about the algorithms in general:
http://mauve.mizuumi.net/2012/07/05/understanding-fighting-game-networking/#more-635

I haven't done any programming on the network stack in a long time, though, so I'm not a great authority on the matter.





Professor
3669th Post



user profileedit/delete message

MMCafe Owner


"Re(3):TCP vs UDP, the question on netcoding" , posted Sat 9 Mar 09:45post reply

Holy Sabo10! It's been a while, hope things are going well!!

Spoon: Thanks for the read. TCP isn't used nowadays so it can be harder to find articles on them. It's pretty interesting how he describes rollback code. There was also a pretty good writing on rollback by GGPO creator Tony Canon in Game Developer Magazine back in fall.





Herv Ranger
0th Post



user profileedit/delete message

New Customer

"Re(1):TCP vs UDP, the question on netcoding" , posted Thu 4 Jul 03:09post reply

TCP is basically reassuring the product gets their. It is far more efficient and less noticeable. TCP is internet environmentally friendly.


UPD was originally used for phone services, and thus VOIP takes advantage of UPD. However when a person uses UPD for personal usage, it looks like an elephant running through a crowd of mice. Meaning everybody can see you. That is bad, because the majority of internet users are composed of youtubing, and facebooking. No longer is the MSN, or privatized type networks are being used as much.

If a bunch of TCP are moving at once, they are like a bunch of insects or mice moving in a field of grass. When an UPD client moves, it is like fitting an wild elephant in that same crowd. Do you want to be that elephant?

UPD is currently used for VOIP, meaning phone service via your internet, Basically UPD via phone is a good way for your provider to make money with the extra space that is not being used at all.

TCP should be used for internet, since it has always been used, and is universal in that nature. UPD is distressful and should be used for emergencies, along those lines.





Professor
3783th Post



user profileedit/delete message

MMCafe Owner


"Re(2):TCP vs UDP, the question on netcoding" , posted Fri 5 Jul 00:56post reply

quote:
If a bunch of TCP are moving at once, they are like a bunch of insects or mice moving in a field of grass. When an UPD client moves, it is like fitting an wild elephant in that same crowd.


Well that's definitely an interesting metaphore for differences in packet transfer. Thanks for your input!