Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCP vs UDP



[example on udp drop out]

>No, it does NOT matter. You'll get another update in a split second.
>There's no benefit in getting repeated old information before the newer
>update you _really_ care about.

>    Of course I still get the 'grimreaper hit you' and I know that
>    the exit is "sw" and not "s" as I see it.  No problem.  I just want to give
>    my commands a bit faster.

>It's actually the opposite. You'll get UPDATES faster, That's what I care
>about.

Using the system that has been proposed for the information passing there
is a big difference.  You should keep in mind that only changed data is
transmitted.  Transmitting the whole screens would use much more bandwith
then TCP and would not be acceptable for slow connections.

Example on UPD error:

The map looks like this.  @@ is player
a1 a2 a3 a4 a5
b1 b2 b3 b4 b5
c1 c2 @@ c4 c5
d1 d2 d3 d4 d5
e1 e2 e3 e4 e5

Now the player tries to move east but the returning MAP message is dropped
out by net.  After second move (this time successfull return message)
the map looks like:

a2 a3 a4 a5 a7
b2 b3 b4 b5 b7
c2 c3 @@ c5 c7
d2 d3 d4 d5 d7
e2 e3 e4 e5 e7
           ^ missing line
   ^  ^  ^ these lines should be one more left.
^ this should no longer be visible

The player may move two more east and there is still one line missing and
2/5 of the screen is messed up.  You might stop for five minutes there and
the map around would look messed up all the time.
By sending only the changes and not the full map bandwith is saved quite a
lot.  UPD would need that the whole map is sent every time and even at
times when there are no changes just to make sure that the information got
through.  Comparing this to xtrek is not very good because there are no
'inactivity' times in it.  If you want to add messages confirming that the
client has already the data then you have implemented TCP on top of UDP.