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



+--- Raphael Quinet:
| - same as above, except that nothing is sent when the client
|   connects.  The names and id numbers are sent when they are needed
|   for the first time.  The server will have to keep a table with
|   what has been sent to every client.  Hmmm... Not a good idea...

Why not? The server already has to keep such a table if players use
pixmaps... Actually, the _client_ should decide the reference number,
so that it can simply return the Pixmap value (which is just a 32 bit
reference number). The value 0 would mean that the image hasn't been
transferred yet.

+---
| 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.

+---
| BTW, how do you want to translate a map to ASCII?

Err, that's the native format of a map. But it's a mute point anyway,
since whole maps shouldn't be sent. It's unnecessary, and if you do
that, the cheater will know the magical effects of items, or what
magic words guards respond to, or ...

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 :-)


Kjetil T.