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.
RNG seed is saved and loaded in single-player
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.
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.
RNG seed is saved and loaded in single-player
Re: RNG seed is saved and loaded in single-player
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.
- Graf Zahl
- 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
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.
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.
Re: RNG seed is saved and loaded in single-player
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.
- Graf Zahl
- 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
Let's better say an unnecessarily added feature for ZDoom.
Re: RNG seed is saved and loaded in single-player
This is what makes it possible to record a demo from a savegame and have it playback reliably, though.
Re: RNG seed is saved and loaded in single-player
Don't demos use the original RNG though? Or was that changed (or am I getting out-right confused with something else)?
- Graf Zahl
- 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
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.
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.