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

This Month's Specials

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

   







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

Reply
 
Thread Tools Display Modes
  #11  
Old June 10th, 2005, 01:45 PM

Oversway Oversway is offline
First Lieutenant
 
Join Date: Feb 2005
Posts: 693
Thanks: 0
Thanked 0 Times in 0 Posts
Oversway is on a distinguished road
Default Re: Replay bug- again !


For size, I don't think the battles store every event - like every unit movement/death/etc. They just store the initial state and random number seeds, and then the algorithm is such that every battle with those conditions should turn out the same. But if the conditions are somehow different (like intial version number), or due to compiler/os/etc. issues where the state gets off, then each battle could wind up widly different.

Thats because they are cycling through a big, big list of random numbers... but if you have 1 more or less attack in one version of the battle, that throws off the entire cycle.

btw All the above is an educated guess.
Reply With Quote
  #12  
Old June 10th, 2005, 06:23 PM
Johan K's Avatar

Johan K Johan K is offline
Brigadier General
 
Join Date: Aug 2003
Location: Mictlan
Posts: 1,767
Thanks: 12
Thanked 165 Times in 22 Posts
Johan K is on a distinguished road
Default Re: Replay bug- again !

Yup, that's how it works Oversway.
__________________
http://www.illwinter.com
Reply With Quote
  #13  
Old June 10th, 2005, 11:33 PM
Graeme Dice's Avatar

Graeme Dice Graeme Dice is offline
General
 
Join Date: Nov 2000
Posts: 3,013
Thanks: 17
Thanked 25 Times in 22 Posts
Graeme Dice is on a distinguished road
Default Re: Replay bug- again !

Quote:
Zooko said:
No offense, Johan K, but if your C code runs differently on different systems, then there must be a bug in your code, such as reading uninitialized memory, making unportable assumptions about the size of an integer, etc. It is traditional for C code to have lots of these bugs.
The classic replay bug was caused by this code:
(get_a_random_number() < get_a_random_number())
which is not evaluated in the same order by every compiler.
Reply With Quote
Reply

Bookmarks


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 01:25 PM.


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