4 ms·
> GameNetworkingSockets is a basic transport layer for games. I understand that this is primarily derived from a gaming platform, but is there anything that ma
by johnhenry 9y ago
> GameNetworkingSockets is a basic transport layer for games.
I understand that this is primarily derived from a gaming platform, but is there anything that makes this useful specifically "for game" and not networked applications in general?
- blackflame7000 9y agoLet's start with why TCP won't work: every time a packet is lost or reordered, your on-screen avatar will put Michael Jackson's moonwalk to shame. UDP won't work by itself either because what happens if that packet that said I got the winning kill didn't make it to the server? There are all sorts of time-and-order-critical messages that are needed to correctly keep score in the game for example. So obviously we need 2 channels, some for order sensitive data (like score) and some for last update possible (like movement)
- cma 9y agoIf you round robin on a bunch of tcp connections you can avoid many of the packet loss latency issues (doesn't give an advantage over udp really, but allows you to work in tcp only environments).
- blackflame7000 9y agoYea if you're gaming on a budget I suppose that would work, but I'd still be worried about the exponential backoff algorithm TCP usages because packets aren't guaranteed to take an unblocked pathway on their subsequent attempts. Its possible to lose a whole bunch of packets before being successfully diverted. And furthermore, what happens if your opponent is scoring points while you're frozen in TCP rectification mode. You're going to need UDP for just about anything that involves players interacting in a 3-dimensional world.