Andy Ross wrote:

Oliver Schroeder wrote:
Andy is, of course, right. We should not send binary data over the
wire and I think that using XDR for transmission

Binary is fine.  Uncooked memory is not. :) And FWIW, XDR seems
awfully heavyweight to me.  It involves a comparatively large amount
of code for things that are really pretty easy, while at the same time
making hand optimization of the packet format more difficult.


The term "binary" is in fact not precise enough in this context. We need a way to encode the data in a host independent format, regardless of what data is send. XDR is a generalization of functions like ntohl(3) and htonl(3). If we implement it ourself with exactly what we need, it isn't bloated at all.

Note that this hand tuning can be really beneficial, especially if the
server is on a low bandwidth link.  The multiplayer protocol I was
thinking of (which these days is, I guess, mostly an idea box for the
working version) managed to pack a full precision* position, velocity,
acceleration, orientation and rotation rate into a block of 26 bytes.
That's about 3x smaller than a naive implementations based on floats
and doubles, which means that you can transmit data on 3x as many
aircraft/objects over the same link.

I don't understand exactly what you mean here, but as mentioned above: XDR is just an encoding standard for data. We can send whatever data we want and we should think about what data should really go over the wire. But that's a different story.

Regards,
Oliver

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to