You have to realize that in UDP, on the order of 99.9% packets get delivered - it's easy enough to resend the failed packets.
Funnily enough that is the case for TCP as well — except it takes care of resending packets for us.
On the other hand, "all packets arrive and in the correct order" means that if a single packet gets delayed, all packets are delayed, and if it's delayed more than 2000ms, the game is disconnected.
TCP is very, very, cleaver about this. A lot of research has gone into so call congestion avoidance algorithms (
http://en.wikipedia.org/wiki/TCP_conges ... _algorithm ) whose purpose is to decide how many packets to send without a response. This number is based off of things such a previous experiences, but varies between algorithms.
Quite often if a single packet is delayed all packets will be delayed (packets are delayed for a reason, such as broken connections). So UDP would be of no use here, either. At least with TCP after delays of 1000ms+ (possible if the route between you and the server changes due to a hub going down) there is a much better chance of having a usable gamestate once all of the packets are resent. Since Warzone is very low bandwidth these can easily be bursted.
UDP offers no benefits. The pings obtained by the current netcode are more than sufficient. When they are not it is more than likely that there is an underlying problem with the connection that renders
any game un-playable, TCP or not.
Furthermore the order
does matter. Consider the case of building a unit and then having it automatically move to a rally point. Or constructing a droid within range of an enemy target.
Moreover by using TCP we do not need to worry about a) creating too many packets, as the OS handles packet construction for us; b) the size of individual packets. While this type of 'corking' is not suitable for an FPS it is for an RTS.
In conclusion: TCP was simpler to use, easier to debug (it is stateful) and presents no real latency issues.
On a side note: UDP is useful to FPS games because of the network model that they use. In this model the entire state is stored on the server, which several times a second creates a new 'state'. The server also maintains a list of previous states and what state each client has. Bringing the clients up-to-date is just a case of computing the delta (difference) between the most recent state the client is known to have and the current state.
The beauty of this is that all the client needs to do is see if the state the server is sending it is newer than its current state and if so update itself and send a response. In this model
any packet can be lost (clients acknowledgement, state delta...) without issue.
Of course, Warzone being peer-to-peer with regards to game state can not make use of this model and therefore UDP is of no advantage.
Regards, Freddie.