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

Re: A few thoughts on client/server in multi-player games



"Carl Edman" <cedman@cedman.remote.Princeton.EDU> writes:
> But haven't we learned from the old map numbering scheme what happens  
> with fixed numbering schemes when several independent groups work on  
> the code ?  *Please* let us avoid that pitfall in the client/server  
> design.
So why not use a compromise setup?  Have some messages use a numbered
format, and have a special number which is an ascii extention.
--
I don't really believe that it matters what format the messages from
the client to the server take because there will not be very many of
them.  I do believe it is important the format of the messages from
the server to the client.  There will be a lot of them.  For example,
if you will assume that there will never be more than a 16x16 board,
you can send updates for a particular monster in 3 bytes.  1 for the x
and y coordinates in the upper and lower nybble, and 2 for the pixmap
id.  This is substantially more compressed than sending an ascii
string describing the same thing.  Moreover, it is faster to process.

Kjetil Torgrim Homme <kjetilho@ifi.uio.no> writes:
> +---
> | The most important thing is that several commands should be sent in
> | a single packet, to avoid the 40 bytes overhead.
> 
> I agree - getting the number of packets down must be the main
> goal. Games like XPilot and Crossfire really kill local networks
> because they require so many updates per second.
I agree too, but I believe the only real solution is to lower the
number of updates/second.  We are currently trying to do ~10 updates a
second.  Lowering this number to 4 would substantially reduce the
bandwidth needed.  Moreover, it would reduce problems with latency.

> I find Carl Edman's views very convincing. A two-digit number can be
> transferred in less space than a 32-bit binary number. You don't have
> to name the protocol commands "transfer_this_list_of_images_please",
> "TMI" will do :-)
If you only need a two digit number, send it as a byte, not a 32-bit
number.
Moreover, commands like TMI aren't particularily good because they
don't really tell you what the command is trying to do, which was the
whole point of trying to have ascii commands.
          -Eric 
*********************************************************
"It seemed like a good idea at the time"
           -The Mad Hatter
"Yes, you're very smart.  Shut up."
           -In "The Princess Bride"
*********************************************************