Open deathcap opened 10 years ago
It might be interesting to take cave-automata-2d and define a grid, say with 16 points, and assign heights at the points. You can then interpolate a spline between the points to create the vertical axis for the cave using 2d automata for the x,z axis. Essentially just combine a heightmap with the automata.
This might be helpful: https://npmjs.org/package/cubic-hermite
Some good discussion of terrain generation at https://news.ycombinator.com/item?id=7734925 http://www.playfuljs.com/realistic-terrain-in-130-lines/ (but this example is using midpoint displacement, 2d, not 3d simplex which would give rise to caves). https://www.npmjs.org/package/cave-automata-2d could also be worth looking into.
Cave generation
references: http://gamedev.stackexchange.com/questions/53400/cave-generation-with-perlin-worms http://gamedev.stackexchange.com/questions/12603/how-is-a-3d-perlin-noise-function-used-to-generate-terrain noise3D instead of 2D height map http://accidentalnoise.sourceforge.net/minecraftworlds.html