nint22 / dwarfcraft

Automatically exported from code.google.com/p/dwarfcraft
Other
0 stars 0 forks source link

Get world generator up to a decent level for camera-level testing #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Get a basic world generator that:
1. Does a height map
2. Does ore distribution underground
3. Doesn't have everything filled with air
4. Allows material layering (i.e. dirt, then stone)
5. Caves
6. Tunnels
7. Tress

Original issue reported on code.google.com by nin...@gmail.com on 30 Oct 2011 at 2:24

GoogleCodeExporter commented 9 years ago
From notch:

"So I switched the system over into a similar system based off 3D Perlin noise. 
Instead of sampling the “ground height”, I treated the noise value as the 
“density”, where anything lower than 0 would be air, and anything higher 
than or equal to 0 would be ground. To make sure the bottom layer is solid and 
the top isn’t, I just add the height (offset by the water level) to the 
sampled result.

Unfortunately, I immediately ran into both performance issues and playability 
issues. Performance issues because of the huge amount of sampling needed to be 
done, and playability issues because there were no flat areas or smooth hills. 
The solution to both problems turned out to be just sampling at a lower 
resolution (scaled 8x along the horizontals, 4x along the vertical) and doing a 
linear interpolation. Suddenly, the game had flat areas, smooth hills, and also 
most single floating blocks were gone."

Source: http://notch.tumblr.com/post/3746989361/terrain-generation-part-1

Original comment by nin...@gmail.com on 30 Oct 2011 at 3:25

GoogleCodeExporter commented 9 years ago
1. Todo
2. Implemented!
3. Todo
4. Todo
5. Todo
6. Todo
7. Implemented! (Trees, not "tress")

Original comment by nin...@gmail.com on 30 Oct 2011 at 5:59

GoogleCodeExporter commented 9 years ago
Note to self: To solve for feature 3, I can't use recursion or seeking, it 
takes far far too long. New approach (will do in morning) will be to buffer 
object placement with air, meaning explicitly add air everytime a new block is 
places, and remove / coalesce air when blocks are removed.

Original comment by nin...@gmail.com on 31 Oct 2011 at 8:01

GoogleCodeExporter commented 9 years ago
1. *Todo
2. Done
3. Done
4. *Todo
5. *Todo
6. *Todo
7. Done

Original comment by nin...@gmail.com on 1 Nov 2011 at 6:24

GoogleCodeExporter commented 9 years ago
Closing since this is a core feature that will need separate reports

Original comment by nin...@gmail.com on 8 Jan 2012 at 2:39

GoogleCodeExporter commented 9 years ago

Original comment by nin...@gmail.com on 8 Jan 2012 at 10:27