5 ms·
What goes wrong if you just use Perlin noise for a height map and pick a "sea level" threshold? That also has the advantage of giving you an interesting seabed
by JoshTriplett 12y ago
What goes wrong if you just use Perlin noise for a height map and pick a "sea level" threshold? That also has the advantage of giving you an interesting seabed, if you have the ability to see underwater.
You'd still want various kinds of local mutation to create interesting features, though. For inspiration, you might look at how games like Angband and Crawl combine procedurally-generated overall level design with pre-constructed "vaults". A similar technique, with enough variations to avoid looking obvious, could work to embed more unusual features in an otherwise procedurally-generated set of continents.
Beyond that, you might also want a dedicated coastline-and-river generator, which picks appropriate high mountains, puts the top of a river there, and has it wend its way down altitude (eroding as needed) until it reaches the "ocean". Throw in some appropriate generation of beaches, riverbanks, and ocean cliffs.
- presidentender 12y agoUsing Perlin noise with a sea level threshold is exactly what the OP and Minecraft both do. It makes the terrain more interesting and varied than what we see in real life, but the world as a whole doesn't have big oceans or continents - just little worms and snakes of land and water twisting around each other. I had tried to avoid this by doing Perlin noise + distance from the center of the map, which makes an approximately-circular "continent" with an okay coastline. Amit Patel's article says "we can draw the coastline any number of ways," which is true - I'm just wondering what those ways are.
- amitp 12y agoSorry about that. What I meant by "any number of ways" is that the way I generate elevations works on any shape of coastline. In the demo, the default is to generate the coastline the way you describe — Perlin noise minus distance from the center of the map. I also have a "Radial" option that draws a bunch of sine waves in polar coordinates, and a "Blob" option that draws my blob logo. It would work just as well if you hand-draw it or use a pizza box or scatter macaroni. I should probably add an explanation to the article.