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

Re: UDP communications (was: Re: Crossfire client)



In message:  <Pine.3.87.9402030749.A2823-0100000@lab15.eng.auburn.edu>
             "William W. Dyess" <dyessww@eng.auburn.edu> writes:
>
>The animated sequences are probably best done with UDP.
>
>--Bill Dyess
--------

I would suggest having both a TCP connection and a UDP connection
to each client.  The TCP connection would give information like
"Medium fireball starts at map 17 x 3 y 12 at time 201" or "Small
Shield 1 at map 17 x 6 y 12 begins burning at time 205" or "Mage
at map 18 x 4 y 15 moved to map 18 x 5 y 16 at time 300" (in a more
compact format, of course).  The UDP connection would send out
messages like "It is now time 297" to maintain reasonable server-
client syncronization.  The reason for the two separate connections
is that you don't want to lose the info about events starting/stopping/
etc, but you don't really care if you miss a time re-sync (the client
should be able to keep time going on its own, if need be).

Note that I specified a spell start time and place, and nothing else.
I see no reason why the client shouldn't know how various spells behave,
and maintain its own idea of the universe without the server telling it
"OK, now that fireball I told you about covers the squares map 17 x 3 y 12
map 17 x 4 y 12 map 17 x 2 y 12 map 17 x 3 y 11 map 17 x 3 y 13", followed
one tick later by a similar message with a slightly larger area, etc.
That level of hand-holding seems like a waste of bandwidth to me.

- Alex