adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Game saving


From: Alexandre Courbot
Subject: Re: [Adonthell-devel] Game saving
Date: 08 Dec 2001 13:11:16 +0100

> Besides, the key needs not be huge. 2 to 4 characters would be enough.
> It'd just would be a matter of the protocol.

Ah, allright. I thought you wanted to send things like:
"mystrengh" "10"
"myspeed"   "20"

... where keys would be huger than values ;) So the keys would be
arbitrary decided by the engine and not intelligeable for the
programmer, to keep them short, right?

It would be usefull to use keys in the case we only need to update a
part of a structure (like the position of a character). I even wonder
whether we couldn't use sort of a mask thing instead. Each bit of the
mask would indicate whether a member of a structure is concerned by the
packet. In certain cases (when you change many things), if would cost
less than using an integer key (I assume keys will be 8 or 16 bits ints,
is that what you had in mind Kai?), while in others (when you only
change one or two things) it will cost more. Well, finally I think the
integer keys thing is better.

> The checksum was meant for the integrity check :). 

Oh, right. A simple XOR checksum would do the trick then, you agree? :)

Alex.

-- 
http://www.gnurou.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]