Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: non-random worlds  (Read 782 times)

puke

  • Bay Watcher
    • View Profile
non-random worlds
« on: November 01, 2006, 06:51:00 pm »

quote:
Originally posted by Lith:
<STRONG>"13 regions rejected". The fastest generation I eve seen. Randseed was 2006. Beautiful world was it!</STRONG>

am i to understand that we can feed the world generator seed values?  This was one of the neat things about the Imperialism games by Frog City.  World generation was random, but you could enter seeds into the generator and consistantly make the same world.

So if someone got a particularly interesting world, they could share it with their friends or post it online without uploading an entire save file.

for DF, someone might post a world-seed and say "this map has lots of dragons on it" or "lots of thriving civilizations that are at war"  or  "good fortress map with elephants and gorillias and unicorns at such-and-such"  or whatever.

is this possible?

Logged

Draxxalon

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #1 on: November 01, 2006, 06:57:00 pm »

You can feed the world generator a seed via the command line.

(read the "command line.txt" in the root folder).

Not sure if you can tell what the seed is in a regularly generated world though.

Logged

puke

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #2 on: November 01, 2006, 07:21:00 pm »

sweet!  this means i'll be busy for hours generating worlds on interesting phrases, and watching what comes out of them.  thanks for wasting my evening!
Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: non-random worlds
« Reply #3 on: November 01, 2006, 07:52:00 pm »

The number you feed it is just the number of the region (like region#.sav).  This was so that an automatic script the person who requested the feature was writing wouldn't get confused.  I'm not sure what the normal way to feed a typeable seed into the Mersenne Twister is...  it has a very large initial state (624*4 bytes) that you wouldn't want to type.  I guess it could copy one 4 byte seed throughout the state space, or does that make the output too regular?  Probably good enough, anyway.

[ November 01, 2006: Message edited by: Toady One ]

Logged
The Toad, a Natural Resource:  Preserve yours today!

Draxxalon

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #4 on: November 01, 2006, 08:07:00 pm »

Ahh, ok, my misunderstanding  :(
Logged

Gakidou

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #5 on: November 05, 2006, 02:03:00 am »

How about, in addition to allowing you to print out a BMP of a world when it is generated, it also gave you the option of saving the seed that generated your world into a .txt file? Then players could upload the file to websites for others to download.

To make things even faster, you could instead save the state of your seed right before it generated a world accepted by the world generator, so that later players recreating the world from that seed would only build the acceptable world, and not all of the rejected worlds.

Logged

ctrlfrk

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #6 on: November 05, 2006, 05:56:00 am »

The save number option is quite handy for *.bat files. although im not too sure what i would want with a couple of hundred generated worlds... unless...
Logged

ricree

  • Bay Watcher
    • View Profile
Re: non-random worlds
« Reply #7 on: November 06, 2006, 04:28:00 am »

How is the initial state generated?

 In the wikipedia article's pseudocode, it uses a 32 bit seed to create the initial state.

Logged