mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-08 06:47:23 -04:00
(https://imgur.com/a/mAG38BN) The number of underground water sources seeded is actually width x depth / 8000 (typo?). The number of tree patches is actually width x depth / 4000 (forgot to remove height after copying and pasting?). Also, the "Eroding..." step seems to be missing. I can't figure out how it works, though, so you will have to pick variable names.
parent
99cd0bbdc8
commit
8df13da10e
@ -26,6 +26,7 @@ Where x, y are the given 2D coords and noise1, noise2 are the two noise function
|
||||
Generation of a Classic Minecraft map, as seen on the sadly defunct browser-embedded version of creative mode that used to be hosted on the main Minecraft site, goes through a sequence of generation steps each time a new map is created:
|
||||
* choose map size
|
||||
* create height-map, _"Raising..."_
|
||||
* smooth out height-map, _"Eroding..."_
|
||||
* create strata, _"Soiling..."_
|
||||
* carve out caves, _"Carving..."_
|
||||
* create ore veins
|
||||
@ -67,6 +68,22 @@ If heightResult < 0 {
|
||||
heightMap(x,z) is then set to the integer component of heightResult + waterLevel.
|
||||
```
|
||||
|
||||
## Smooth out height-map
|
||||
|
||||
Using:
|
||||
* noise1, a combined noise function with two octave noise functions (of octave 8) as input.
|
||||
* noise2, a combined noise function with two octave noise functions (of octave 8) as input.
|
||||
|
||||
For each column in the x,z plane assign a new elevation value to heightMap computed from:
|
||||
```
|
||||
Let a be noise1.compute( x*2, z*2) / 8
|
||||
Let b be 1 if noise2.compute( x*2, z*2) > 0, otherwise 0
|
||||
|
||||
If a > 2 {
|
||||
heightMap(x,z) is then set to: (int)((heightMap(x,z) - b) / 2) * 2 + b
|
||||
}
|
||||
```
|
||||
|
||||
## Create strata
|
||||
|
||||
Using:
|
||||
@ -185,7 +202,7 @@ for len in veinLength {
|
||||
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
|
||||
width x depth / 8000
|
||||
|
||||
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.
|
||||
|
||||
@ -280,7 +297,7 @@ Repeat 20 times {
|
||||
|
||||
### Trees
|
||||
|
||||
Finally trees are added to the map, there will be width x height x depth / 4000 patches of trees created.
|
||||
Finally trees are added to the map, there will be width x depth / 4000 patches of trees created.
|
||||
|
||||
For each tree patch:
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user