AI providing the same dices in the same situation

Get ready for Mark H. Walker's Lock ‘n Load: Heroes of Stalingrad. This is the first complete computer game in the Lock ‘n Load series, covering the battles in and around Stalingrad during World War II.
Post Reply
User avatar
moet
Posts: 193
Joined: Sun May 18, 2008 2:17 pm
Location: Montréal

AI providing the same dices in the same situation

Post by moet »

I assume this is the expected outcome, but I never saw this in any other video wargames : If I save the current game, do a fire action, quit without saving, load the saved game and do the same fire action again, I get the same dice results. I wonder how you did program it?
User avatar
Tom Proudfoot
Posts: 1297
Joined: Tue Apr 25, 2000 2:00 pm
Location: Alameda, CA
Contact:

RE: AI providing the same dices in the same situation

Post by Tom Proudfoot »

Making sure both players in multiplayer have the same combat results requires the game to keep careful track of the random number seed. If you don't know what a random number seed is: http://en.wikipedia.org/wiki/Random_seed

At some point I realized that if the seed was also saved in the save game, I would be able to repeat many things people report by loading up their saves - most importantly, things the AI decides, since it autosaves right before the AI's turn - and this has been incredibly useful.
User avatar
CapnDarwin
Posts: 9724
Joined: Sat Feb 12, 2005 3:34 pm
Location: Newark, OH
Contact:

RE: AI providing the same dices in the same situation

Post by CapnDarwin »

Fixed random seeds are in a good number of games. Latest XCOM uses it. We use it in Red Storm as well.
OTS is looking forward to Southern Storm getting released!

Cap'n Darwin aka Jim Snyder
On Target Simulations LTD
User avatar
moet
Posts: 193
Joined: Sun May 18, 2008 2:17 pm
Location: Montréal

RE: AI providing the same dices in the same situation

Post by moet »

Thanks for the lesson. [:)]
I didn't notice it with Red Storm.
Post Reply

Return to “Lock ‘n Load: Heroes of Stalingrad”