3 ms·
Sorry I was doing calculations at 2 seconds timeout. Lets make it even harder for the TCP truthers. Hold on to your neckbeards. Lets say that somehow sending
by gafferongames 12y ago
Sorry I was doing calculations at 2 seconds timeout.
Lets make it even harder for the TCP truthers. Hold on to your neckbeards.
Lets say that somehow sending 90 byte packets 60-times a second for 2 seconds is bad. Lets also say it would be nicer to have a longer timeout like 10 seconds. I agree.
Here's how to do it. Clamp the maximum number of inputs per-packet to 60 (1 seconds worth). If you don't receive any acks for one second something is clearly wrong. If this happens go into "congested mode". In this mode, send packets only 4 times per-second, and keep resending those 60 inputs until an ack comes back. If no ack comes back within 10 seconds, time out. If an ack comes back, go back to non-congested mode and resume sending at 60 packets per-second.
There you go. Congestion avoidance over UDP. Problem solved.
- asuffield 12y agoWhat's a "TCP truther"? Is it hiding under the bed? > There you go. Congestion avoidance over UDP. Problem solved. Yes, that sounds entirely reasonable. Please do this, instead of what is described in the article.
- gafferongames 12y agoThe example described in the article sends an average payload of 6 bytes (smaller than UDP header) and converges to a steady state bandwidth that is a function of RTT and the number of player input changes per-second that is generally independent of the amount of packet loss. Given that with this protocol the average average stream is 12kbps, the vast majority of which is UDP packet header, I think your concerns about congestive internet failure are somewhat overblown.
- omeganemesis28 12y ago> somewhat overblown. Somewhat? Possibly one of the most overblown statements I have ever seen. Just try to picture the headline - "Halo 57 multiplayer brings whole ISPs down due to UDP design DDoS". Hilariously overblown.
- gafferongames 12y agoIf we are to be concerned about 12kbps, just wait until my next article when I describe how much UDP traffic is blasted out by non-deterministic game networking models ;)