datalurkur / Mountainhome

A detailed and intricate worldsim borrowing from the Dungeon Keeper-style dungeon-building mechanic
You're lookin' at it.
6 stars 2 forks source link

Break Terrain generation down into phases #54

Closed StLoch closed 14 years ago

StLoch commented 14 years ago

Terrain generation should be broken up into phases (using the builder pattern?) and made to operate on a single interface, rather than manipulating raw data that eventually gets built into a more complex object.

datalurkur commented 14 years ago

Since I imagine terrain storing its data in a 3-dimensional array, this would be a logical progression: 1) Add world layer (this will basically generate a single heightmap, give it a type, and then push it on top of any existing layers) 2) Erode world - this will perform some kind of natural erosion operation, be it thermal or hydrological (note that this doesn't actually add water to the world) 3) Grow features - this is a special step used to add pockets of trace minerals underground in the pre-existing world, or create underground caves (basically the same as the previous example, but creating empty space instead of a mineral type) 4) Simulate seismic activity (This will take chunks of the world and "shear" them to create fault lines, also determining proper places for lava pipes and lakes)

datalurkur commented 14 years ago

World layering is more or less working. I'll move on to erosion and seismic simulation (minus lava flows), next.

datalurkur commented 14 years ago

Terrain gen now has seismic "shearing" and some basic nearest-neighbor-averaging-style erosion. I toyed a bit with the averaging window, and settled on a weighted system. Examine TerrainBuilder for more details.

datalurkur commented 14 years ago

This is pretty much broken up. I'd say we need to create sub-tickets for specific terrain-gen phases.