|
|
|
 |

February 25th, 2004, 08:26 PM
|
 |
Major General
|
|
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
There may be #pragmas or compiler options to change reordering behavior, but I'm not too familiar with MSVC.
Wrapping the randomizer in an object and making sure that the "get a random number" method (perhaps as a static method, even) might serve as a hint to the compiler; could be more work than it's worth.
[edit] Making sure that it's not flagged as constant, that is. IOW to encourage the compiler to consider side-effects of function invocation.
[ February 25, 2004, 18:51: Message edited by: Taqwus ]
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
|

February 25th, 2004, 08:46 PM
|
Lieutenant Colonel
|
|
Join Date: Apr 2003
Location: Nuts-Land, counting them.
Posts: 1,329
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
I have often battle inconstancies message now, with solo play on windows platform.
__________________
Currently playing: Dominions III, Civilization IV, Ageod American Civil War.
|

February 25th, 2004, 08:57 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
Way outside of my area but I was thinking that the Devs might have to write their own randomizing routine, and have the host create a seed. Then pass the seed its using inside each of the player files so that the players copy of Dom would definetly use the same routine on the same seed. I never figured on different OSs doing standard math in different orders. Thats insane.
[ February 25, 2004, 18:58: Message edited by: Gandalf Parker ]
__________________
-- DISCLAIMER:
This game is NOT suitable for students, interns, apprentices, or anyone else who is expected to pass tests on a regular basis. Do not think about strategies while operating heavy machinery. Before beginning this game make arrangements for someone to check on you daily. If you find that your game has continued for more than 36 hours straight then you should consult a physician immediately (Do NOT show him the game!)
|

February 25th, 2004, 09:06 PM
|
 |
Brigadier General
|
|
Join Date: Aug 2003
Location: Mictlan
Posts: 1,767
Thanks: 12
Thanked 165 Times in 22 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
Quote:
Originally posted by Pocus:
I have often battle inconstancies message now, with solo play on windows platform.
|
Bah, can't you let me be happy for more than 1 hour and 13 minutes. 
|

February 25th, 2004, 09:15 PM
|
Second Lieutenant
|
|
Join Date: Jan 2004
Posts: 510
Thanks: 24
Thanked 31 Times in 12 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
Quote:
Originally posted by Saber Cherry:
So the moral is actually not to trust Microsoft products, since they take away your control [/QB]
|
No, the moral is to be damn careful when using random numbers in sync. 
__________________
When I said Death before Dishonour, I meant alphabetically.
|

February 25th, 2004, 09:16 PM
|
 |
General
|
|
Join Date: Jun 2003
Location: az
Posts: 3,069
Thanks: 41
Thanked 39 Times in 28 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
I have seen this bug about 3 times for all of the games I have played. It is very rare... and definitely a bizarre bug.
It has worked both ways for me... One battle it showed me losing... yet on the map I won. Another battle it showed me winnning... yet on the map I lost.
2 of these were seen with patch 2.08 installed.
[ February 25, 2004, 19:17: Message edited by: NTJedi ]
__________________
There can be only one.
|

February 25th, 2004, 09:29 PM
|
 |
Major General
|
|
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
|
|
Re: 2.08 and Incompatible Battle Reports
*scratches head*
'volatile' may also help. The MSDN C++ Language Reference states, "Objects declared as volatile are not used in optimizations because their value can change at any time". Perhaps creating an 'int volatile do_not_reorder_me = 0;' declaration, explicitly separating the computations into multiple lines e.g.
int lhs = lhs_base + invoke_2d6() + do_not_reorder_me;
int rhs = rhs_base + invoke_2d6() + do_not_reorder_me;
would work. I haven't played around with that keyword much however -- been awhile since I wrote MT code.
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|