glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] Cleanups...


From: Nuage
Subject: Re: [glob2-devel] Cleanups...
Date: Mon, 24 Jan 2005 20:31:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050122

This is true.

But, for some tricks, we need the "clear()" to set *all* the 32 bits
of this field in a *deterministic* value.

As you know, glob2 networking is based on a "globaly synchoneous"
architecture. Notice that this is techincaly nice, but quite hard to
work with it!

To improve the chance to detect a desynchronisation bug, and detect it
faster, there is a ::checksum() method in all important objects. The
"Map" use it. And in order it to be computed as fast as possible, it
use a 32-bits length access. It use "Ressource::getUint32()". Here is
the problem. If the inital value of this 32bits field is not correctly
initialised, the checlsum result will not be the same on every computer.
This is the reason why your parch can't be applied, sorry.

Another reason, would be that we want to keep all values of the engine
to behave in a deterministic behaviour. Therefor un-initialised values,
even in unused fields should be avoided. (despite it's not always
made, nor possible).

Still, it's possible to make the Map::checksum() to be insensitive on
the non-initalised values. If you still want to make it ?


Don't hesitate to ask! Is it clear enough ?
Nuage


simon schuler wrote:
another trivial patch, that shouldn't change anything in the Game (just for readability and coding style): If NO_RES_TYPE is already defined, it should be used; no need to set the other members, as they're undefined after setting type=NO_RES_TYPE.

simon



------------------------------------------------------------------------

_______________________________________________
glob2-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/glob2-devel




reply via email to

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