|
|
|
 |

March 25th, 2004, 10:25 PM
|
 |
Brigadier General
|
|
Join Date: Aug 2003
Location: Mictlan
Posts: 1,767
Thanks: 12
Thanked 165 Times in 22 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
The source of the bug has been discussed in another thread. It's called battle inconsistency.... something. Anyway it was a compiler inconsistency.
|

March 25th, 2004, 11:11 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
Quote:
Originally posted by ywl:
quote: Originally posted by Johan K:
This bug has been fixed in the next patch. So hopefully you'll soon be able to mix OSes and still get correct battle replays.
|
Just curious. What's the source of the bug? It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers.
__________________
-- 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!)
|

March 25th, 2004, 11:22 PM
|
 |
First Lieutenant
|
|
Join Date: Sep 2003
Location: Bordeaux, France
Posts: 794
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
Quote:
Originally posted by Gandalf Parker:
quote: Originally posted by ywl:
quote: Originally posted by Johan K:
This bug has been fixed in the next patch. So hopefully you'll soon be able to mix OSes and still get correct battle replays.
|
Just curious. What's the source of the bug? It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers. More precisely, I believe, it was the Windows compiler doing things correctly, but differently than other compilers, with code that is somewhat ambiguous.
Not everything is Microsoft's fault, after all.
|

March 26th, 2004, 12:10 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
Quote:
Originally posted by PhilD:
It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers.
|
More precisely, I believe, it was the Windows compiler doing things correctly, but differently than other compilers, with code that is somewhat ambiguous.
Not everything is Microsoft's fault, after all.
I agree. I use Windows most of the time and consider it great for some things. I didnt say it did it wrong, I just said it did it differently than the multi-OS compilers did.
[ March 25, 2004, 22:12: 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!)
|

March 26th, 2004, 12:16 AM
|
 |
Lieutenant General
|
|
Join Date: Mar 2004
Location: Albuquerque New Mexico
Posts: 2,997
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
Quote:
Originally posted by Gandalf Parker:
It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers.
|
Which is of course why (in C/C++ especially) explicit grouping (via parenthesises) is your friend. Makes it easier for the human programmer to know exactly what the code is going to do, and makes it harder for evil compilers to find wriggle room to twist the programmer's intent. 
__________________
Wormwood and wine, and the bitter taste of ashes.
|

March 27th, 2004, 01:10 AM
|
First Lieutenant
|
|
Join Date: Dec 2003
Location: Calgary, Canada
Posts: 762
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
Quote:
Originally posted by Cainehill:
quote: Originally posted by Gandalf Parker:
It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers.
|
Which is of course why (in C/C++ especially) explicit grouping (via parenthesises) is your friend. Makes it easier for the human programmer to know exactly what the code is going to do, and makes it harder for evil compilers to find wriggle room to twist the programmer's intent. I'm curious. Is it possible to fix Johan's problem with just grouping by parenthesises? How would you rewrite the expression for that?
|

March 27th, 2004, 02:49 AM
|
 |
Lieutenant General
|
|
Join Date: Mar 2004
Location: Albuquerque New Mexico
Posts: 2,997
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Best (CD Bootable?) Linux Distro for Dominions?
[quote] alexti:
[QB]I'm curious. Is it possible to fix Johan's problem with just grouping by parenthesises? How would you rewrite the expression for that? [\qb]
Well, if "It was something about the windows compiler not doing math formulas in quite the same order as generic open OS compilers" then odds are that the use of parathensises, and breaking the formula down into discrete lines of code, would take care of it.
Hard to say how to rewrite the expression without seeing the source code and expression, but the complex multiline statements often used to express formulas are a common source of problems. The C++ standard left a few too many things (like order of evaluation) undefined, meaning that even on the same platform, different compilers give different results. This is even without accounting for compiler inadequacies, where there is currently only one (Comeau / EDG) available that is approximately 100% compliant with the standard. (Last I knew, Comeau didn't support "export" on templates, but then, no one does.)
Another likely culprit, though, would be automatic promotion of floats to doubles - different compilers handle it differently, leading to some wildly disparate results. Again, often best handled through explicit casting, and breaking long statements into short ones, such that intermediate results aren't left to compiler whims.
Anyways - use of parenthesises, and breaking complex lines of code (especially calculation heavy code) down into shorter, simpler, statements makes multiplatform life _much_ easier.
Cainehill (whose Last job involved a lot of graphics, GUIs, and modeling & simulation with the same source on different hardware platforms and OSs)
__________________
Wormwood and wine, and the bitter taste of ashes.
|
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
|
|
|
|
|