Notch (the Minecraft Developer) Answers Your Questions 89 points by ugh 2633 days ago | hide | past | web | favorite | 11 comments

 Most technical question/answer:"11. Ahawks This may be "confidential" information, but I have to ask: As a developer, I am amazed at the amazing world that's created dynamically. Towering mountains, twisting caves opening up to caverns, islands, precious ores sprinkled throughout, etc. Notch, could you explain at a high level how the world generation algorithm does this?I'm not sure how to explain it without getting technical.. The complicated high level technical version is: First I generate a linearly interpolated 3d perlin noise offset along the y axis. I fill that in so that everything except the top x blocks is stone, then I do a second pass to add features like grass, trees, gravel, sand, caves and flowers. The world is generated in chunks of 16x16x128 blocks, based of pseudorandom seeds that are a mix of the level base seed and the chunk location in the world. This ensures that you always get the same terrain in an area regardless of what direction you traveled there from."
 First I generate a linearly interpolated 3d perlin noise offset along the y axisWhat an interesting application of perlin noise. Anybody aware of any other similar applications?
 Ken Musgrave's work on Terrain rendering is worth a look. He did similar things. The book 'Texturing and Modeling: A Procedural Approach' gives a nice explanation of a lot of the techniques and they used to give a course at SIGGRAPH on which the book was based but I can't find a link right now
 I found this link discussing using Perlin Noise to generate artificial terrain:
 It's quite common in procedural generated games to use perlin noise to create terrain (anything, really:).My master thesis was about "PRNGs in game programming", and I've done 2d side scroller shooter with unlimited world generated on the fly using 2d perlin noise.http://alan.umcs.lublin.pl/~ajuc/programy/gry/hw3/hw3.tar.gzIf anyone is interested there it is - written in C++ with SDL, libparagui and a few other SDL_* libraries. Probably compiling it will be hard - I've used libparagui that was in gentoo at that time, then I've learned it is patched version, and on other systems older version was in the package managers.
 Still can't find a link to the SIGGRAPH talk but the libnoise tutorial is a nice example of how to code this sort of thing