.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 September 15th, 2004, 10:19 AM

deccan deccan is offline
Major
 
Join Date: May 2003
Location: Solomon Islands
Posts: 1,180
Thanks: 0
Thanked 0 Times in 0 Posts
deccan is on a distinguished road
Default Re: Game Crash

Just my neophyte suggestion: wouldn't it be better to have it append a timestamp + process id instead of a random number?
__________________
calltoreason.org
Reply With Quote
  #2  
Old September 15th, 2004, 10:21 AM

reverend reverend is offline
Sergeant
 
Join Date: Nov 2003
Location: Fürth, Germany
Posts: 384
Thanks: 8
Thanked 16 Times in 2 Posts
reverend is on a distinguished road
Default Re: Game Crash

dom16882 here as well. Clearly not as random as it should be.
__________________
Dom3 Nation Reference

Reply With Quote
  #3  
Old September 15th, 2004, 12:01 PM
Cainehill's Avatar

Cainehill Cainehill is offline
Lieutenant General
 
Join Date: Mar 2004
Location: Albuquerque New Mexico
Posts: 2,997
Thanks: 0
Thanked 0 Times in 0 Posts
Cainehill is on a distinguished road
Default Re: Game Crash


With random numbers, of course it is possible for the same number to come up in a row, even on different computers.

After all - flip a coin 8 times, there's a one in 64 chance it comes up heads every time. Roll a die 3 times, there's a one in 256 chance that it'll come up a 6 each time.

In an infinite universe, it's not just possible, but a certainty that random numbers will come up the same across _all_ instances on a given day.

On the other paw - mine is dom16822. It's a sign from Dog!

Really does seem like it's using the same seed for the RNG, or not setting a seed at all. You should probably use the clock for generating the seed, or use deccan's suggestion of a timestamp and whatnot (on multiple user systems, I've used a combination of a date/timestamp plus a random number, testing for the existence of that already and incrementing the number if need be, just for paranoia's sake.)
__________________
Wormwood and wine, and the bitter taste of ashes.
Reply With Quote
  #4  
Old September 15th, 2004, 12:21 PM

PDF PDF is offline
Colonel
 
Join Date: Apr 2002
Location: Near Paris, France
Posts: 1,566
Thanks: 0
Thanked 0 Times in 0 Posts
PDF is on a distinguished road
Default Re: Game Crash

Hooo, mine is also dom16822, every time I play, and on 2 different comps with different OSes (one W98SE, one NT).
Looks like the RNG used is in fact a "CNG" - constant number generator !
Reply With Quote
  #5  
Old September 15th, 2004, 12:39 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: Game Crash

Maybe the clock stands still in Windows? I get different random numbers in Linux. Seems like I should take a look at it in Windows too.
__________________
http://www.illwinter.com
Reply With Quote
  #6  
Old September 15th, 2004, 01:19 PM

Thufir Thufir is offline
First Lieutenant
 
Join Date: Jul 2004
Location: California
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Thufir is on a distinguished road
Default Re: Game Crash

Quote:
Johan K said:
Maybe the clock stands still in Windows? I get different random numbers in Linux. Seems like I should take a look at it in Windows too.
That sounds like a good idea. I was doing some tests on magic duel (on a Windows box) and saw some surprising results, so I was beginning to wonder whether I was getting a truly random sample. With an s6 vs s7, I saw the s6 win only 2/20, which conflicts with what we've been told of the formula for magic duel. Here's where I posted the results:
post

I'd really like to know whether loading from saved files resets the seed in a way that'll generate true random samples, so I can know if my testing is valid, or not.
Reply With Quote
  #7  
Old September 15th, 2004, 01:22 PM

Thufir Thufir is offline
First Lieutenant
 
Join Date: Jul 2004
Location: California
Posts: 631
Thanks: 0
Thanked 0 Times in 0 Posts
Thufir is on a distinguished road
Default Re: Game Crash

Quote:
Johan K said:
Maybe the clock stands still in Windows? I get different random numbers in Linux. Seems like I should take a look at it in Windows too.
Oh, and btw, this may sound weird, but in the limited tests that I did, it wasn't as if the clock stood still, but rather that it moved in 10 minute chunks. I don't know if that's possible, but maybe if somehow the Last byte of the time value were right shifted, or something like that...

I know, sounds unlikely, but that would be consistent with the way the magic duel was behaving in my tests.
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 12:09 PM.


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