Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: World generation.  (Read 956 times)

Surma

  • Bay Watcher
    • View Profile
World generation.
« on: October 23, 2007, 12:56:00 pm »

After modding in a couple new species of fauna, I noticed that I made an error in one one of them. Of course, I only noticed this after having the world generator go on for about 250 cycles. And so I thought "Why not have a 'world generation log'?"

For each newly created region a log using that regions 'randomized' name (The Everseeing Land, etc..) would be created. In this text file would be a counter (the cycle number) as a header, with the reason for the regions rejection beneath.

For me at least, this may have let me debug the raw without having to go through 250+ rejections.

Just a thought.  :)

Logged

Lightning4

  • Bay Watcher
    • View Profile
Re: World generation.
« Reply #1 on: October 23, 2007, 09:24:00 pm »

Importing Elephants...
Failed.
Reason: Not enough elephants.

Though realistically, I don't think an error in modding will cause a world to not generate. It's really only a matter of luck. Some worlds might not generate until the late 200's, some might generate instantly.

But it still makes me wonder why they fail in the first place.
It seems like there's a base line for a world to fulfill and if it fails, it dumps it and generates a new one. Probably to keep stuff like total ocean or glacier worlds from happening, or if there's a severe lack of biomes or something.

Logged

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: World generation.
« Reply #2 on: October 23, 2007, 09:40:00 pm »

The worlds are abandoned if they don't have a fairly even mix of plains, forests, mountains, and oceans, or if their various data layers produce strange results.

Toady has since specified that he is considering allowing people to avoid abandoning these worlds, since unusual worlds would then be interesting by nature of their uniqueness.

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Fishersalwaysdie

  • Bay Watcher
  • Slayer of Threads
    • View Profile
    • http://chupacabra
Re: World generation.
« Reply #3 on: October 24, 2007, 02:26:00 am »

My first world was generated from the second try.
I am still surprised.
Logged
Cannot find self-destruction button, could have sworn it's somewhere here...

mickel

  • Bay Watcher
    • View Profile
Re: World generation.
« Reply #4 on: October 24, 2007, 04:21:00 pm »

It'd be interesting to see a reason given though. Well, at least for the helplessly curious among us.  :)
Logged
I>What happens in Nefekvucar stays in Nefekvucar.

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: World generation.
« Reply #5 on: October 24, 2007, 05:06:00 pm »

I had a rejection logger sitting around for debug, so I've made it an init option now.  The modding error wouldn't lead to rejections though, unless you were fiddling with entity definitions.
Logged
The Toad, a Natural Resource:  Preserve yours today!

mickel

  • Bay Watcher
    • View Profile
Re: World generation.
« Reply #6 on: October 25, 2007, 02:19:00 am »

I figured Toady would have something like that sitting around for use in debugging.

I imagine most cheat codes in computer games start out as debugging tools as well, that simply are left enabled or are re-enabled at some point.

Logged
I>What happens in Nefekvucar stays in Nefekvucar.

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: World generation.
« Reply #7 on: October 25, 2007, 06:57:00 pm »

Generally.  Sometimes devs like to make up cheat codes just for fun, though.  For instance, the "Riot" cheat code for Grand Theft Auto 3 gave all citizens in the games weapons (including rocket launchers, machine guns, you name it) and made them all attack targets randomly.  When you disable police officers, it's freaking fun to play in one of those scenarios for a short while, though of course it grows boring eventually.

Or the hover cars in Vice City, although that may have been added because drowning was still a guaranteed Error 14 (unavoidable certain death) and the developers got sick of it.  At least in San Andreas the PC finally learned how to swim...

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin