Suggestion: storing/reusing world seeds

I’d love to have a simple mechanism for storing and/or reusing the random seed used for world map generation. I, for one, have lost many interesting and challenging world maps to these issues. This would make restoring that deleted save, or recovering after a save corruption, far less painful.

I hope I’m not alone here!

It’s an idea. Not sure whether a given seed guarantees a given world–but yeah, could be interesting.

In the world of computers, random can actually mean pseudo-random. Thus, when we send the same seed value to the random number generator it will always return the same output. This is why games with random elements, especially roguelikes, usually take special precautions to insert some type of ‘noise’ into the random number generator to produce a better emulation of randomness.

using namespace std;

int main() {
for (int x=1;x<5;x++){
cout << rand() << endl;

For example, if you compile and run that code several times you’ll see that you always see the exact same ‘random’ numbers from rand(). Doesn’t matter how many times you run it. It will always return the same numbers, because rand() is starting with the same seed value.

Seems like it’d be trivial to let the player see the seed for their current world. I’d like this. Though bear in mind the game also generates most of its particulars in-game rather than at worldgen, in particular building/room variations, items, etc.

Indeed, but wouldn’t that make it better? In my opinion, I believe it would.

Would be good to move over old worlds to new patches.

Doesnt work like that. Whenever map generator is changed the result is different on same seeds. Same seeds generate same results only on same version of worldgen.

But yes, custom seeds would be anyway welcome just to mess inside one version. Maybe dual-seed so you could have non-random world but random loot & spawns.