Ideas on solving desyncs in Release compilation?

Discussion about the game and its default mods.
Post Reply
Rydrael
Posts: 14
Joined: Sun Dec 29, 2013 8:44 am

Ideas on solving desyncs in Release compilation?

Post by Rydrael »

Hello there,

IIRC, one of the main problems that restricted this game to be run in Release mode (therefore speeding up the game) was the treatment different OS and architectures gave to floating numbers. I was wondering if all those problems have been solved. If not, maybe there are a couple of posts I've found that may help on this issue:

http://stackoverflow.com/questions/1948 ... arithmetic
http://stackoverflow.com/questions/6051 ... -math-in-c
http://gamasutra.com/blogs/MaksymHryniv ... minism.php

I wanted to know which other issues have been identified in the code which are culprits of desyncs, Can anyone tell me about this?

Thank you!

User avatar
Sleipnir
Posts: 878
Joined: Wed Apr 10, 2002 11:52 pm
Contact:

Post by Sleipnir »

We don't use (much) floating point math in the simulation code, specifically to avoid the determinism issues there.

There was some investigation into the release vs debug profiles, but this ended up being dropped again after we confirmed that it only really affected custom builds using the Microsoft csc compiler.

The debug mode executables generated by mono (which we use for our installers on all platforms, including windows) were found to be significantly faster than those from csc, and IIRC they were only a small amount slower than the executables generated with optimizations on either toolchain.

Rydrael
Posts: 14
Joined: Sun Dec 29, 2013 8:44 am

Post by Rydrael »

Sleipnir wrote: We don't use (much) floating point math in the simulation code, specifically to avoid the determinism issues there.

There was some investigation into the release vs debug profiles, but this ended up being dropped again after we confirmed that it only really affected custom builds using the Microsoft csc compiler.

The debug mode executables generated by mono (which we use for our installers on all platforms, including windows) were found to be significantly faster than those from csc, and IIRC they were only a small amount slower than the executables generated with optimizations on either toolchain.
Uhmm, when I was developing and profiling the pathfinder, IIRC an example took 300 ms to compute in Release while in Debug took about 500 ms (using the MSBuild integrated in VS). It surprises me that the mono compiler generated faster builds than MSBuild.

Post Reply