The world desyncs are currently the biggest problem with glob2 at this time. As mentioned previously in the forum and bug listing the problem seems to be caused by the modified flag settings. As far as I can tell from the source code and wiki information in order to keep the bandwidth down only the orders themselves are transmitted over the network which means when flags are placed they have different values thereby causing the desyncs. I have modified the code slightly and uploaded onto CVS so that the game now ignores the custom settings and only uses the default values which should prevent the desyncs. I only have one computer I can compile on so I don't have any way of testing for desyncs and would appreciate if someone could help me test this to make certain this really is the problem. Also if this does fix the problem I will need help correcting the custom flag settings so it can be reimplemented without causing desyncs. Currently the place causing the problem (which is now commented out) is in Building.cpp lines 77-85. As you can see in this area globalContainer->settings.<whatever> is assigned to maxUnitWorkingLocal which is the variable that determines how many units are working once it has been determined whether it's a flag or not via shortTypeNum. My idea for correcting the problem would be to make modifications client side. Specifically set the game so that when a building(flag) is placed if there is a custom setting it performs a quick loop sending out orders to increment the workers. This way as far as the game is concerned it would be just as if the player had quickly placed the flag and then clicked on the increment button 10 times or however many is specified in the settings. While not efficient I believe it would be the easiest plan to implement (the other being having the players default number of units being sent out over the network at the beginning of the game). I feel the best place to add this in would be at GameGUI.cpp at lines 1606 which deals with adding buildings. I've played around a bit with the code here but I'm not the best coder and there are a few parts I'm getting stuck with. The first part is the building types, typeNum is different then the shortTypeNum variable specified in building.cpp and saved in buildings.txt and I haven't been able to find proper documentation as to what the types are in order to specify the different buildings/flags. Second, I need a way to specify that the building placed is the one that needs updating (especially since it doesn't becomes selected). Either that or a new order doesn't require a selected building but I think that would be more difficult.
-- Do not be afraid to joust a giant just because some people insist on believing in windmills. _______________________________________________ glob2-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/glob2-devel
