EDIT: This is not true. I went ahead and tested it (which I really should have done in the first place. Silly me, trusting other people's words...), win2k and winXP generate identical worlds, even for 'problem' worlds like paul's world, seed 4265985437.
A report posted in the DF general forums claimed that paul's world seed produced similar but non-identical worlds. This seems to have been caused by anonymousphrase modding his raws somehow and is not a problem with DF at all.
Paul's screenshot, which is what XP and 2K both match:
http://img222.imageshack.us/img222/7413/location2in8.png anonymousphrase's screenshot, ostensibly created with raws which were modified somehow:
http://i21.tinypic.com/2mgjjft.png So all in all, this 'bug' seems to not exist, at least between windows 2k IA32 and windows XP IA32. It MIGHT still exist with 64 bit versions of either, but someone else has to test that.
LN
Old, disproved report follows, ignore it.
The random number generation system used on windows XP and Vista is not exactly the same as the one used on windows 2000, and since df uses the random generation calls directly, fortress seeds produce different results on different operating systems. DF should have an internal random number generator which is identical to the one XP and Vista use.
Edit: actually, the difference is between the implementations of MSVCRT rand()
the windows XP implementation is, I BELIEVE (someone with msvc please test this):
#define RAND_MAX MSVC_rand_max
/* globals */
int32 oldseed = 0; /* 32 bit value, signed */
uint32 MSVC_rand_max = 0x7fff; /*<- usually defined using RAND_MAX somewhere in code, defaults to 0x7fff otherwise */
int32 MSVC_rand(void) /* returns a random number between 0 and RAND_MAX */
{
int32 newseed;
newseed = ((oldseed * 214013) + 2531011) % 2147483648;
oldseed = newseed;
return (newseed >> 16) & MSVC_rand_max;
}
void MSVC_srand(int newseed)
{
oldseed = newseed;
}
(Somewhat unrelated, the Windows 2000 'CryptGenRandom' random number generator meant for cryptography, (which i do NOT think is the one DF uses) was reverse engineered by some Israeli researchers, and the code is described here: http://eprint.iacr.org/2007/419.pdf
)
LN
P.S. One more important thing: every program thread has its own copy of the 'oldseed' variable, so if multiple threads call rand() it will behave as expected WITHIN EACH THREAD but not globally.
[ December 06, 2007: Message edited by: Lord Nightmare ]
[ December 06, 2007: Message edited by: Lord Nightmare ]
[ December 09, 2007: Message edited by: Lord Nightmare ]