Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: SEED?  (Read 1154 times)

Bovinepro

  • Bay Watcher
    • View Profile
    • http://www.omg.com
SEED?
« on: October 29, 2007, 08:00:00 pm »

In the wurld generation screen I see a variable called... "SEED"...
what does this do?

Thx,
Me.

Logged

GrimmSweeper

  • Bay Watcher
  • Tome of Knowledge
    • View Profile
Re: SEED?
« Reply #1 on: October 29, 2007, 08:02:00 pm »

Seeds the random number generator with a number to start it off.

It helps in getting the same results over and over again.

Logged

Name Lips

  • Bay Watcher
    • View Profile
Re: SEED?
« Reply #2 on: October 29, 2007, 08:02:00 pm »

I've seen this before in other games. Though the world generation appears random, it actually depends on a "seed" to get going - a set number (usually between 1 and 99999 or something). Inputting the same number will generate exactly the same world each time. So if you have a world you like, with tons of sinister deserts and tundra, you can just tell your fellow forum-dwellers the world seed, and we can generate it for ourselves.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: SEED?
« Reply #3 on: October 29, 2007, 08:14:00 pm »

This will probably be obvious to me when I get home and actually try it out, but...

If you start world generation and it gets a valid world on the 24th try, then that means it generated 24 different seeds, right?  And when you pass off the seed to someone else, they won't have to fail 23 times before succeeding?

(As opposed to having one seed to start off worldgen, so anyone else would have to fail 23 worlds, just like you did.)

Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

GrimmSweeper

  • Bay Watcher
  • Tome of Knowledge
    • View Profile
Re: SEED?
« Reply #4 on: October 29, 2007, 09:01:00 pm »

Not quite. The seed is like an initial number for the random number generator. It's where it starts in the "stream" of random numbers that it produces. The proceeding number is dependent on that initial value, just like the next one is dependent on the first generated value, and the next on the second generated value, and so on. At least, in one case of pseudo random number generators that I'm familiar with.

For your example, if you get a valid world after 23 failures with one seed, handing off that seed to someone should give the same results: a valid world after 23 failures.

Logged

pushy

  • Bay Watcher
  • [MEANDERER]
    • View Profile
Re: SEED?
« Reply #5 on: October 29, 2007, 09:09:00 pm »

quote:
Originally posted by Name Lips:
<STRONG>it actually depends on a "seed" to get going - a set number (usually between 1 and 99999 or something)</STRONG>

A bit more than that...specifically, a number between 1 and 8,640,000  ;)

quote:
If you start world generation and it gets a valid world on the 24th try, then that means it generated 24 different seeds, right?
Would do, yes...but depending on how Toady coded it, those seeds may not necessarily be consecutive numbers.
Logged
Quote from: Tim Edwards, PC Gamer UK
There are three things I know about dwarves:
1. They've got beards. Even the women.
2. They're short. Especially the women.
3. They're Scottish.