Creating random seeds and saving them (procedural generation)Universe

Hi guys

I’m having a problem wrapping my head around scenario like this.

Say I’ve got a scene called Universe. Now, my game procedurally generates content of each Universe. Entering a new Universe to see new content, finishing it and going to the next one isn’t much of a problem. However, I’d like to add ability to go back AND to generate a set of universes(say, 5) along certain path. Now, how exactly can I achieve this?

The latter one, I can store somewhere information about each Universe whether it should have exits on left/right or top/bottom and just generate as player moves forward using this data. The tricky part is coming back. What would you guys recommend? Serializing the whole scene (will it even work in this case?), picking up and serializing my own information about the random scene? Not sure how to approach this.

You need to be saving the generation parameters when you generate the universe, which will allow you to then recall those parameters later in order for them to act as a “seed”. Usually if you are using random generation to create these random universes, then you should first “seed” the random number generator, usually by using the system date time as a reference as that will almost always be unique (or you could make a GUID and do things properly).

But essentially all a seed is is a set of parameters which when passed through either a RNG generator or your procedural universe generator will always cause the same results.

So think if your passing a number of worlds as a parameter and max minimum spacing of worlds, you will need to record those values in order to generate the same amount of planets, at the same distances apart.