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

Re: Client/server protocol



In message <199407080802.AA29978@bolero.rahul.net>you write:
>The client server discussion seems to have pretty much died.  Since it needs
>to be done, I thought I would start working on the protocol.  This is mostly
>Carl Edman's protocol, with some clarifications and implementation thoughts
>tossed in.  Some of the thoughts were gleaned from the old mail log.
>
>The original proposal will have > pretended to the lines.  Clarifications
>will also be in this area.  The document has also be re-organized
>to some extent.
>
>C->S: MOVE 123 44 45
>A request by the client to move the player (object 123) south (from
>44 to 45).  Remember, that the maps make 0,0 as the upper left corner,
>not lower left as in standard geometry.

	Are you sure you worded that right?  Do you mean the client tells
the server to move object 123 to location (44,45) or from location 44 to 
location 45.   What you said doesn't sense.
 
>S->C: ITEM 123 44 45
>Telling the client that object 123 is now at 44,45.  IT does not
>need to send full data, since this object never left LOS.
>
<<<< STUFF DELETED >>>>>
>
> IF anyone has good ideas on how to handle this area, I would
>be interested.

	I don't really like either of those ideas although I will
have to think about it more before I can come up with something better.

>Back to the player moving (S->C: ITEM 123 44 45):
>
>When the client receives this, it should scroll the map up one.
>It now sends a map command to fill the new bottom row up:
>S->C: MAP 40 50 wall 41 50 wall 42 50 wall ...

	Maybe you didn't make a mistake above.  How does the client
know the server is talking about y coordinates and not x coordinates
or vice-versa?

>Various thoughts are welcome.  I am really worried about finding a good
>way to implement the MAP and ITEM commands in an efficient manner.
>
>Mark Wedel
>master@rahul.net

	I have sorta kinda agreed to do the client/server split however
I can't start on it right away (soda is moving and is taking all my time).
Here is what I sort of had envisioned for the client server.

	Take all the display code out of the server and put it into
a "module".  There is no reason for the server to be making X calls.
 	I looked around the code a bit a month ago or so and didn't see
all that much X stuff that wasn't already grouped in xio.c.  The player
struct will have to be cleansed and player.c but I think everything else
is ok.

	Next, put in all the networking code.  Since the X code
is still there, people could still play by telneting but could
also play using the client.  I have no problem doing this part.
Mehlhaff has a nice network library that will do the job.
Did we ever decide if the client/server was going to be 
TCP only?  I was thinking more along the lines of netrek which
uses UDP but you can switch to TCP only if you want.

	Once the client/server is working and well tested, take the X code
out of the server.  This can be done at someone's convenience although it should
be done before the net release.

	Mehlhaff also had a good idea about making up a player abstraction
but I forgot what that was all about, I will ask him what his idea
was when I get a chance.


##############################################################################
#  Scott MacFiggen   --  88 VTR250  --  EUVE Systems Administrator  --  CEA  #
#     									     #
#  smurf@soda.berkeley.edu   CSUA Vice-President   scottmm@cea.berkeley.edu  #
##############################################################################