Posted January 12, 2019
Hi,
I also was thinking about some kind of randomness in the economy AI code aswell but i couldn't find any usual pseudo random code in there. (Of course it might be done somehow else.)
The AI does checks, what you are doing to block thair attacks like checking position of your soldiers (or your new towers). The save way would be loading the savegame a view times and just watch, if the AI does somthing different without any input from your side.
For my network tests i made a map with two human players and two cpu players near together with many soldiers to provoke a fight and enough resources for their economy.
What i saw during my tests is, that the game does a good job when it comes to game tick syncronisation.
I was monitoring the game tick count of both nodes and they kept syncron during the netgame despite provoked diconnections.
I could use this game ticks as timestamps to get a hint what the economy AI of both nodes were doing at the same time. And this is were i saw the sudden additional jumps and calls of sub programs in the economyai.dll of one of the node getting worse and more with time.
I once "had luck" on my test-map as it didn't take long to get a desync. (about 4 minutes)
But sometimes it took about 30min or it didn't desync the whole day.
Some ppl said that saving often during the netgame prevents or reduces the chance of a desync.
I could see that this was due to the saving function stopping the game ticks and saving every stati of the game,
also the status of the economy AI. -> if you are lucky, the saving process will reset the drift of the economy AI of both nodes for some time. If you got bad luck, one of the nodes will save its economy AI drift, if it got already too worse in the background. The game ticks are still syncron though.
(That are these savegames, where the desync always comes up directly or shortly after loading the savegame.)
Btw.: I saw, that in the S4 History Version, Ubisoft merged alot of .dll files into one S4_main.exe.
Also the economyai.dll is no more. Its seems to me that they didn't just compress the dlls in the main exe...
They integrated the economy AI code there? So i guess they should be able to fix our bug. :P
TC,
morphy
I also was thinking about some kind of randomness in the economy AI code aswell but i couldn't find any usual pseudo random code in there. (Of course it might be done somehow else.)
The AI does checks, what you are doing to block thair attacks like checking position of your soldiers (or your new towers). The save way would be loading the savegame a view times and just watch, if the AI does somthing different without any input from your side.
For my network tests i made a map with two human players and two cpu players near together with many soldiers to provoke a fight and enough resources for their economy.
What i saw during my tests is, that the game does a good job when it comes to game tick syncronisation.
I was monitoring the game tick count of both nodes and they kept syncron during the netgame despite provoked diconnections.
I could use this game ticks as timestamps to get a hint what the economy AI of both nodes were doing at the same time. And this is were i saw the sudden additional jumps and calls of sub programs in the economyai.dll of one of the node getting worse and more with time.
I once "had luck" on my test-map as it didn't take long to get a desync. (about 4 minutes)
But sometimes it took about 30min or it didn't desync the whole day.
Some ppl said that saving often during the netgame prevents or reduces the chance of a desync.
I could see that this was due to the saving function stopping the game ticks and saving every stati of the game,
also the status of the economy AI. -> if you are lucky, the saving process will reset the drift of the economy AI of both nodes for some time. If you got bad luck, one of the nodes will save its economy AI drift, if it got already too worse in the background. The game ticks are still syncron though.
(That are these savegames, where the desync always comes up directly or shortly after loading the savegame.)
Btw.: I saw, that in the S4 History Version, Ubisoft merged alot of .dll files into one S4_main.exe.
Also the economyai.dll is no more. Its seems to me that they didn't just compress the dlls in the main exe...
They integrated the economy AI code there? So i guess they should be able to fix our bug. :P
TC,
morphy
Post edited January 15, 2019 by xmorphyx