[quote]I think your video protocol gets us back to initial contentions.
(A) if you don’t need reliable or in order devliery then by all means use UDP (unless you have serial PPP bandwidth issues.) Thats what its for!
[/quote]
I think you may have read more into what I said. The sending of these large video files must be reliable and bit for bit accurate… this is not for broadcasting, it is for arbitrary file copying… video files are just what we happen to be transferring.
quote For very domain specific things… you can improve on TCP…
But its a lot of work and requires a pretty deep understanding of how the net actually functions. People who just slap a simple reliability/ordering protocol on top of UDP are reinventing the wheel and end up only hurting their performance.
[/quote]
I agree 100%
[quote]Unfortunately, that last is the most common occurance in games that decide to “use UDP 'cause its faster!”
quote As you say, FTP isn’t TCP. Also when you start talking about file transfer, or anythign that can be buffered (like video streams) bandwidth is usually much more important then latency. People often confuse the two but they are very different quantities and have very different effects. Game packets on the other hand are usually more latency then bandwidth sensative.
[/quote]
Right, My point on game packets is that in the event of an error along the data path, TCP will correct that at the expense of both bandwidth and latency. If your packet has to get through though TCP will probably do the best job and so you just have to live with what you get. However, depending on the size of the game state, it may make sense to send enough of it such that it does not matter if previous packets made it through, or the error that results would not be objectionable to matter and will correct itself when another few packets make it through.
With a little thinking ahead you may come to the conclusion that order of delivery and guaranteed delivery don’t actually help you. The state of the client won’t be ‘wrong’ long enough to matter, or the packets that TCP will send to correct the ‘problem’ are just getting inserted in the stream and delivered to the client when the next packet that supersedes that state is already waiting in the clients network buffer anyway. It’s just something to think about… you could probably calculate how useful it is to consider these things when you work out the ping vs. bandwidth and try to determine the time it takes to correct for a lost packet vs. the time it takes to get the next newer packet of game data.
quote Foward Error Correction makes a lot of sense I think where the data stream is well known into thge future, but again game packets usually arent that way.
[/quote]
I agree… I initally stated as much, saying that this UDP+FEC idea might be useful for downloading models, patches, level etc. but not dynamic game state.
quote Lastly video ofcourse can handle some loss and error so perfect error correction isnt necessary.
[/quote]
I should have just said “big files” there was no data loss allowed.
[quote]In order to get above 28.8K the modems do compression and decompression, so upping the bandwidth actually UPS the latency as that takes time.
[/quote]
But compression happens almost instantly relative to the slow speed of the transmission. Recall that the link between modem and CPU is MUCH faster than the phone line… the data would be sitting in the modems buffer waiting to get out anyway - so compression happens for free - when it is done by the modem hardware, and not some crappy winmodem with all the work done by the CPU… so does this not ultimately save latency via the methods Herkules mentioned by delivering a shorter packet?
[quote]Even worse, the faster you try to run the analog modem the more likely it is to fail due to noise and have to fall back and find a new speed to communicate at. These retrains can take 6 or 8 SECONDS.
[/quote]
Ah but your game, these days, has no control over the speed that the modem attempts to connect at. So re-trains do to line noise etc are just going to happen… the only thing that your program can control that I could thnk might effect it is that it might not know that it has to retrain until you actually send data for it to barf on… so by that account the more data you send the more opportunity it would have to realize the connection is crap. But as for speed that the data travels - that is usually beyond the control of applications. The dial-up networking layer will deal with it.