3 ms·
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
by siculars 16y ago
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."
- ugh 16y agoAnd the result: http://www.youtube.com/watch?v=NszGurDUlHc http://www.youtube.com/watch?v=NszGurDUlHc
- elblanco 16y agoFirst I generate a linearly interpolated 3d perlin noise offset along the y axis What an interesting application of perlin noise. Anybody aware of any other similar applications?
- z303 16y agoKen 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
- Simucal 16y agoI found this link discussing using Perlin Noise to generate artificial terrain: http://www.vterrain.org/Elevation/Artificial/ http://www.vterrain.org/Elevation/Artificial/
- ajuc 16y agoIt'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.gz http://alan.umcs.lublin.pl/~ajuc/programy/gry/hw3/hw3.tar.gz If 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.
- z303 16y agoStill 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 http://libnoise.sourceforge.net/tutorials/tutorial3.html http://libnoise.sourceforge.net/tutorials/tutorial3.html