Dwarf Fortress > DF Suggestions

Zero rejects seed saving

(1/2) > >>

JT:
If I'm interpreting things correctly, Dwarf Fortress currently uses the following algorithm during world generation.code:1. If player has specified a seed, the seed is written into the random
  generator state.
2. Random generator saves the current random generator state to be written to
  the info file.
3. Random generator reads seed value.
4. Random generator generates an altitude layer.
5. Random generator generates a wetness layer.
6. Random generator generates a temperature layer.
7. Other layers (wildlife, culture, etc.)...
8. Random generator evaluates the layers to determine if world is rejectable.
  If so, generator rejects world and goes to step 3.  Otherwise generation
  continues with history and civilisation generation.Every time it goes to step 3, it should go to step 2 instead.  If the exact state of the seed was preserved every time the PRNG went to step 2 -- iff Dwarf Fortress uses a standard 32-bit PRNG instead of a Mersenne Twister -- then I believe this would result in zero rejects for a saved seed, since the random generator always has a certain completely-deterministic state before attempting each world to generate.I proposed this in #bay12games but most of the people seemed to think this wouldn't work.  I can't fathom why, since I'm intimately familiar with how PRNG seeds are stored. =P[ November 01, 2007: Message edited by: JT ]

PTTG??:
It sounds like it would work- in fact, when you export the map info, I think it stores the working seed in a text file. I have to test that, actually- see if the politics are the same in worlds with the same seeds (if not, we basically have alternate worlds with identical landmasses!) We have to start a thread or wikipage somewhere with neat world seeds...

Toady One:
It is a twister, unfortunately, so it would have to save I've forgotten how many hundreds of longs there are.  It could swap back to the more basic RNG, as it does for some other behaviors, but it would be tricky because it uses functions through the game that use the twister, and they are all over the place.

Sowelu:
Couldn't you just generate a new seed each time you start a new world generation attempt?  Obviously you generate a new seed when you start the program, so this should work alright--we're not talking cryptography, here, so re-seeding from the time should not be an issue.OTOH that does limit us to only 2^32 possible universes, so... :/

Anticheese:
4,294,967,296 Universes is more than enough for alpha testing   :)

Navigation

[0] Message Index

[#] Next page

Go to full version