.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old February 25th, 2004, 07:45 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: 2.08 and Incompatible Battle Reports

Yay! Not only was the problem solved, but also, Microsoft gets another black mark
__________________
Cherry
Reply With Quote
  #2  
Old February 25th, 2004, 07:47 PM
PhilD's Avatar

PhilD PhilD is offline
First Lieutenant
 
Join Date: Sep 2003
Location: Bordeaux, France
Posts: 794
Thanks: 0
Thanked 0 Times in 0 Posts
PhilD is on a distinguished road
Default Re: 2.08 and Incompatible Battle Reports

Quote:
Originally posted by Johan K:
Some good new for those who don't play Dominions on Windows exclusively. The problem with incompatible battle replays has been found. There was a disagrement on how to compile an expression between microsoft's and the others' compilers.

Magic resistance check:
if (penetration+2d6 < MR+2d6)

Other compiler solved it from left to right, but microsoft's solved it from right to left. This results in the same roll of dice appearing on different sides of the '<' for windows and linux.
Bloody annoying!


Alexti: Thanks for the STL info and I use MSVC6.
Hmm... it's been some time since I had a look at books where the norm is described, but I'm not sure it says anything for this. I believe the result is "unspecified"...

Don't use two function calls in the same expression, is the lesson.

(And congrats on the Illwinter crew! When are we getting a patch so we can celebrate?)
Reply With Quote
  #3  
Old February 25th, 2004, 07:49 PM
fahdiz's Avatar

fahdiz fahdiz is offline
Sergeant
 
Join Date: Jan 2004
Location: Oregon, USA
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
fahdiz is on a distinguished road
Default Re: 2.08 and Incompatible Battle Reports

Quote:
Originally posted by PhilD:
(And congrats on the Illwinter crew! When are we getting a patch so we can celebrate?)
I second on both counts. After reading Arryn's AAR, Utgard is calling to me...

...unfortunately, it's calling from a moose-laden Smouldercone right now.
__________________
I agree with the realistic Irishman who said he preferred to prophesy *after* the event.
-- G.K. Chesterton
Reply With Quote
  #4  
Old February 25th, 2004, 07:54 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: 2.08 and Incompatible Battle Reports

Quote:
Originally posted by PhilD:
Don't use two function calls in the same expression, is the lesson.
Compliers do strange things. A poorly-written compiler could rearrange consecutive lines if there is no obvious dependancy.

1: a=2d6+penetration
2: b=2d6+mrst
3: if(a>b){do c}

Lines 1 & 2 could be rearranged by a compiler if, for example, mrst is more local (already in a register) and penetration has to be fetched. That would have the same effect. I think C has some commands that let you force the complier to not rearrange things, though.

So the moral is actually not to trust Microsoft products, since they take away your control
__________________
Cherry
Reply With Quote
  #5  
Old February 25th, 2004, 08:26 PM
Taqwus's Avatar

Taqwus Taqwus is offline
Major General
 
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
Taqwus is on a distinguished road
Default 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...
Reply With Quote
  #6  
Old February 25th, 2004, 08:46 PM

Pocus Pocus is offline
Lieutenant Colonel
 
Join Date: Apr 2003
Location: Nuts-Land, counting them.
Posts: 1,329
Thanks: 1
Thanked 0 Times in 0 Posts
Pocus is on a distinguished road
Default 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.
Reply With Quote
  #7  
Old February 25th, 2004, 08:57 PM
Gandalf Parker's Avatar

Gandalf Parker Gandalf Parker is offline
Shrapnel Fanatic
 
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
Gandalf Parker is on a distinguished road
Default 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!)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 09:58 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.