Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: fairly complex map generation mechanics question  (Read 633 times)

riffraffselbow

  • Bay Watcher
    • View Profile
fairly complex map generation mechanics question
« on: November 23, 2009, 02:24:36 am »

When a map is generated, is the world (IE, down to the finest detail, as you see in dwarf/adventure mode) fully generated?

Or is that procedurally generated from some kind of seed or hash created at map generation?
Logged
"And God saw that the world was too moist, and that none of the Scorpion race could be placed upon it; and so he started over."

Hungry

  • Bay Watcher
  • Former controller of Zombie Fenrir
    • View Profile
Re: fairly complex map generation mechanics question
« Reply #1 on: November 23, 2009, 02:37:50 am »

From what i know the world is made from the interaction of several pretty random map layers that control temp, plants, height, evil, good, savage, ect...

and the seeds are just random combinations of these different layers...

while caves, volcanos, water, rivers and civs are controlled seperately...

you can see these layers by going into legends and exporting a map under the "d: export detailed map", thats not the "standard biome+site map".

and it is fully generated including people sites items and events...
« Last Edit: November 23, 2009, 02:45:47 am by Hungry »
Logged
Breccia isnt in DF, like garden slugs.
Cheese for the Cheese boat!

Derakon

  • Bay Watcher
    • View Profile
Re: fairly complex map generation mechanics question
« Reply #2 on: November 23, 2009, 11:43:11 am »

The world' isn't fully generated, down to each terrain tile. A pocket 17x17-region world has 289 region tiles, each of which has 256 subregions (16x16), each of which is 48x48 and has at least 15 z-levels. Multiply those all together and you get a bare minimum of 2556887040. If every tile were given a single bit in the savefile, it'd be 304.8MB just for the terrain information, ignoring all civilization details. And this is for a perfectly flat map, remember.

What I suspect happens is that when you generate the map, it generates a random number seed for each 48x48 area, and that seed is used to create the local terrain.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

riffraffselbow

  • Bay Watcher
    • View Profile
Re: fairly complex map generation mechanics question
« Reply #3 on: November 23, 2009, 07:04:10 pm »

What I suspect happens is that when you generate the map, it generates a random number seed for each 48x48 area, and that seed is used to create the local terrain.
Yeah, that was my thought

and yeah, *all* of the information for every tile would be ridiculous.
Logged
"And God saw that the world was too moist, and that none of the Scorpion race could be placed upon it; and so he started over."