Preprocessor flag: SYNCCHECK
Can I remove this flag and compile it every time? A build without it is not useful imho
Preprocessor flag: TRACE_SYNC
Whats the difference between this and SYNCCHECK?
Config variable: Map archives
Do I remember right that it is not possible to store more than one map in an archive because of checksum errors? Why should we keep this option then?
To be continued...
Some feedback would be nice
Thanks
Removal of unneeded stuff
Re: Removal of unneeded stuff
Hmm, IIRC SYNCCHECK conflicts with SYNCDEBUG (which is broken btw), so I don't think removing it too soon is a good idea.Auswaschbar wrote:Preprocessor flag: SYNCCHECK
Can I remove this flag and compile it every time? A build without it is not useful imho
TRACE_SYNC creates an enormous trace file that can be diff'ed against trace file of other clients to narrow down desync. Basically this is made obsolete by the SYNCDEBUG #define (if it worked that is )Preprocessor flag: TRACE_SYNC
Whats the difference between this and SYNCCHECK?
SYNCCHECK only enables checking whether clients are in sync, no debugging stuff like TRACE_SYNC has. (SYNCCHECK is enabled by default while TRACE_SYNC is disabled by default)
No, this is not for that issue. This just enables/disables whether archives in the root of the Spring data directories are mapped into the VFS.Config variable: Map archives
Do I remember right that it is not possible to store more than one map in an archive because of checksum errors? Why should we keep this option then?
IMHO this option could be removed together with that automatic mapping: In Spring we got .sdz/.sd7/.sdd after all and a fairly established way to switch mods etc, so I don't think there is much use for mapping every archive in the root of the data directory into the virtual file system (plus this mapping may cause desync in MP games if you forget to remove the archives).
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
I think that's about it. Though I didn't even recall the GameServer one so I may forget others too...
I know there is one in streflop too but since that's basically a third party library (even though made specifically for Spring) it doesn't count.
One thing to watch out for with the RNGs is the randomness, the one in GameSetup.cpp is specifically made to be random with low numbers too:
When I used rand() % numTeams in it I always got the same startposition setup, but when I used (int)((double)rand() / RAND_MAX * numTeams) the startpositions were properly randomized.
In the end though I think one class could do it all (with a global synced and a global unsynced instance, and maybe an instance in gameserver, since it's a different thread), especially if it also has operator() so it can be used as functor in e.g. std::shuffle.
I know there is one in streflop too but since that's basically a third party library (even though made specifically for Spring) it doesn't count.
One thing to watch out for with the RNGs is the randomness, the one in GameSetup.cpp is specifically made to be random with low numbers too:
When I used rand() % numTeams in it I always got the same startposition setup, but when I used (int)((double)rand() / RAND_MAX * numTeams) the startpositions were properly randomized.
In the end though I think one class could do it all (with a global synced and a global unsynced instance, and maybe an instance in gameserver, since it's a different thread), especially if it also has operator() so it can be used as functor in e.g. std::shuffle.