RNG seed is saved and loaded in single-player

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 a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: RNG seed is saved and loaded in single-player

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

by Graf Zahl » Mon Jun 04, 2012 12:46 am

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.

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

by edward850 » Sun Jun 03, 2012 6:13 pm

Don't demos use the original RNG though? Or was that changed (or am I getting out-right confused with something else)?

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

by randi » Sun Jun 03, 2012 6:09 pm

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

by Graf Zahl » Sun Jun 03, 2012 2:36 pm

Let's better say an unnecessarily added feature for ZDoom.

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

by Gez » Sun Jun 03, 2012 2:10 pm

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.

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

by Graf Zahl » Sun Jun 03, 2012 1:41 pm

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.

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

by Enjay » Sun Jun 03, 2012 1:27 pm

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.

RNG seed is saved and loaded in single-player

by Nash » Sun Jun 03, 2012 1:04 pm

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.

Top