mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-09 15:28:21 -04:00
description of water and lava flood-fills
parent
b0a0c8e5ee
commit
9efff51e4a
@ -97,7 +97,7 @@ For each cave:
|
||||
Let cavePos be a random point (x,y,z) within the (width,height,depth) space.
|
||||
Let caveLength be randomFloat() * randomFloat() * 200
|
||||
|
||||
//cave direction is given by two angles and corresponding rate of change in those angles,
|
||||
//cave direction is given by two angles and corresponding rate of change in those angles,
|
||||
//spherical coordinates perhaps?
|
||||
Let theta be randomFloat() * Pi * 2
|
||||
Let deltaTheta be 0
|
||||
@ -132,7 +132,7 @@ for len in caveLength {
|
||||
|
||||
where fillOblateSpheroid is a method which takes a central point, a radius and a fillBlockID to use on the block array.
|
||||
|
||||
For each entry (x,y,z) within -radius to +radius within the block array:
|
||||
For each entry (x,y,z) within -radius to +radius in the block array:
|
||||
```
|
||||
dx = x - center.x
|
||||
dy = y - center.y
|
||||
@ -178,11 +178,21 @@ for len in veinLength {
|
||||
fillOblateSpheroid( veinPos, radius, oreBlockID)
|
||||
}
|
||||
```
|
||||
|
||||
## Flood-fill water
|
||||
// Todo
|
||||
|
||||
Water is flood-filled into the map, spreading horizontally and down vertically, from the x,z edges of the map at a height of water level - 1.
|
||||
|
||||
Some underground water sources are then added to the block array to create flooded caves. The number seeded is:
|
||||
width x depth / 800
|
||||
|
||||
For each water source a random x and z coordinate value is chosen and the y coordinate is set to water level - 1, or water level - 2. If this position in the block array is AIR then the water flood-fills out and downwards.
|
||||
|
||||
## Flood-fill lava
|
||||
// Todo
|
||||
|
||||
The lowest layer of the block array is always lava, having been set so during strata generation. A few lava flooded caves might form. Only width x depth / 20,000 lava sources will be seeded.
|
||||
|
||||
For each lava source a random x and z coordinate value is chosen and the y coordinate is set to (water level - 3) x randomFloat() x randomFloat(). If the position is AIR then lava is flood-filled from that point.
|
||||
|
||||
## Create surface layers
|
||||
// Todo
|
||||
## Create plants
|
||||
|
Loading…
x
Reference in New Issue
Block a user