3 ms·
Last I looked at WebRTC it fell back to TCP if it couldn't open a UDP session which means it's fairly useless as a game protocol. Is that still the case or do
by vvanders 10y ago
Last I looked at WebRTC it fell back to TCP if it couldn't open a UDP session which means it's fairly useless as a game protocol.
Is that still the case or do the guarantee a non-blocking protocol?
- ARCarr 10y ago"Fairly useless" Depends what kind of game you're making.
- nitwit005 10y agoIf you need UDP, and a UDP connection can't be set up, aren't you screwed regardless?
- stcredzero 10y agoIf you've designed your protocol, such that you're sending packets smaller than 1.5k (or better 572 bytes) then over a really good connection, TCP will perform like UDP, or close enough in any case. With modern 1st world broadband (which doesn't include all of the US, unfortunately) you just want UDP to minimize that fraction of the populace that gives you a 1-star rating and says your game sucks because their network sucks. The big difference comes in with packet drops. TCP, with its delivery and order guarantees, will cause huge outliers in latency. Even when those outliers are rare, they will make your game look completely janky. With good broadband, those outliers will be very, very rare, and the game will look good.
- vvanders 10y agoIt's not just packet drops and MTU, you also have congestion control, Nagel algorithm and a host of other things working against you in a TCP connection. You're trying to turn a stream protocol into a message based protocol and you're going to experience an impedance mismatch if you try to use the wrong protocol for your use case.
- stcredzero 10y agoYou're trying to turn a stream protocol into a message based protocol and you're going to experience an impedance mismatch Definitely. But the reality is that it won't bite you for the part of your audience that's on premium broadband and corporate networks. Conversely, it's going to really really suck for people in crowded apartments on WiFi and bad connections of all kinds. I know this because I'm operating an MMO server on Amazon AWS right now.
- TD-Linux 10y agoFrom Javascript, you can look at the available ICE candidates and discard the TCP ones (and if none are left, display an error message).