RNG seed is saved and loaded in single-player

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

RNG seed is saved and loaded in single-player

Post by Nash »

Graf Zahl wrote:
Kinsie wrote: I have, however, heard complaints of autosaves on map load effectively removing the randomness from random() since the seed is saved, but there's not a whole lot I can do about that the way things stand.

Report this as a bug, maybe something will be done about it. In my opinion saving the RNG seeds in singleplayer games makes little sense.
User avatar
Enjay
 
 
Posts: 27087
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: RNG seed is saved and loaded in single-player

Post by Enjay »

I have noticed a number of times in the past that loading and reloading a save game can lead to the exact same supposedly random event over and over. I just assumed that things were meant to be that way as a result of, I dunno, some form of making demos or saves or whatever more reliable.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RNG seed is saved and loaded in single-player

Post by Graf Zahl »

There's actually 2 problems here:

1. The seed is preserved
2. There's tons of different RNGs.

In Boom's single player mode only a single RNG is used and its state not saved. That makes things a lot more random.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: RNG seed is saved and loaded in single-player

Post by Gez »

Dunno, I don't see this as a bug so much as a missing feature. Not saving the RNG seed in single player should be a MAPINFO option. By default, saving the seed makes sense to me.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RNG seed is saved and loaded in single-player

Post by Graf Zahl »

Let's better say an unnecessarily added feature for ZDoom.
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: RNG seed is saved and loaded in single-player

Post by randi »

This is what makes it possible to record a demo from a savegame and have it playback reliably, though.
User avatar
edward850
Posts: 5890
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: RNG seed is saved and loaded in single-player

Post by edward850 »

Don't demos use the original RNG though? Or was that changed (or am I getting out-right confused with something else)?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49234
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: RNG seed is saved and loaded in single-player

Post by Graf Zahl »

You are getting confused.

ZDoom uses a large number of different RNGs, each one for a specific action. All this gets saved to a savegame so whenever you save/relead the state is the same.

Concerning Randy's objection, here's a very simple solution: Save the state anyway but when in single player mode and not recording/playing back any demo ignore it and use one generic global RNG for everything.
Post Reply

Return to “Closed Bugs [GZDoom]”