Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: World Generation Curiosity  (Read 724 times)

Citizen of Erl

  • Bay Watcher
    • View Profile
World Generation Curiosity
« on: August 18, 2006, 04:33:00 am »

First off, let me say what a wonderful game you've created, Toady. I really have no proper words to describe how interesting it has been. Even when Unicorns raided my first truly successful fort on the tail of the merchant caravan.

There has been something that I have been wondering. Namely, how does the World Generator work? I am something of a writer, and I found that I really enjoyed watching it create a world region by region, then fleshing out civilization details.

I noticed it went through and rejected a number of regions before settling in on one. What are the criteria for rejection and acceptance? How does it decide how to make rivers, and readjust terrain? How are the various regions fleshed out (I noticed mine had an Elven land called The Artificial Forest, which very much piqued my interest).

I'm starting to run over at the keyboard a tad. Thank you for the excellent game, Toady.

Logged

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: World Generation Curiosity
« Reply #1 on: August 18, 2006, 04:36:00 am »

I really hope that the names of locations will relate to what that location is like.

Though it makes places like "The Hills of Pregnancies" somewhat eerie.

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: World Generation Curiosity
« Reply #2 on: August 18, 2006, 04:11:00 pm »

The world generator mainly uses a simple fractal routine to generate elevation, rainfall, temperature, "geology/flatness" and "savagery".  These are used to create the biomes, and it then takes all adjacent places of the same biome and generates region names.

Rejection is fairly strict right now (as you can tell when you get 300+).  Since you are stuck with the world for a long time (at least when the corruption bugs are cleared up), I wanted them to have most of the various features that are available.  So it checks for those at various points along the way.  If a map isn't likely to have enough forest, it is rejected quickly.  Occasionally a map can get almost to the end, but then the possible start sites for the dwarves are too homogeneous, leading to a painful rejection.

If you look briefly at "raw\objects\language_words.txt" and "raw\objects\language_SYM.txt" you can see the meat of the name generation.  It takes words from the dictionary, and then uses the symbol lists to pick words that are appropriate.  However, a lot of it can just be considered "flavor" right now -- evil regions get evil names, good regions get (arguably) good names, forests have their main now be a forest word, etc., but a lot of the names that look meaningful are just for color.  As the regions become more individualized, more symbol lists can be added to keep the names appropriate.

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

Citizen of Erl

  • Bay Watcher
    • View Profile
Re: World Generation Curiosity
« Reply #3 on: August 18, 2006, 05:38:00 pm »

Ah, I see. Thank you very much.

I have to admit, the Captain raises an ineresting point, as well, It would be intriguing to see place names affect the places themselves; for instance, the word pregnancies keyed, perhaps, to extra encounters or perhaps installing a small midwife's house in the region, or artificial leading to things being made of unnatural substances.

Edit: Given I have no clue is this is even remotely feasible and I'm just asking for a pony.

[ August 18, 2006: Message edited by: Citizen of Erl ]

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: World Generation Curiosity
« Reply #4 on: August 19, 2006, 02:58:00 am »

I was planning to do that with some of the artifacts.  It could use the symbol lists (what it uses to generate evil region names etc.) connected to the name to push some powers onto an artifact, rather than trying to do it the other way around.
Logged
The Toad, a Natural Resource:  Preserve yours today!