Live data from Hacker News

Building an Infinite Procedurally-Generated World

spin.atomicobject.com

1–10 of 41 posts

Re: Building an Infinite Procedurally-Generated World

#2
How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's view.

When I did my (abortive) procedural world generator, I tried summing Perlin noise with a circle, and treating values below a certain threshold as water, with values above the threshold as land. That worked okay, because it would give a believably jagged coastline with offshore islands, but it was still obviously just a circle when viewed at scale.

Does anyone have a quick-and-dirty idea for partitioning land and water?

Re: Building an Infinite Procedurally-Generated World

#3

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

Well, if you had a mathematical model of continent formation from actual geology, you could use some of the noise generation to obtain values for the model's free parameters, and then just run the simulation forward (possibly approximating it very cheaply since you don't need maximal real-world accuracy) to get your continents.

Re: Building an Infinite Procedurally-Generated World

#4

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

http://www-cs-students.stanford.edu/~amitp/game-programming/... was a springboard for many people dealing with this problem. That whole site is worth a read if you're interested in game development at all.

Re: Building an Infinite Procedurally-Generated World

#5

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

(Author here): One approach is to use multiple layers of noise configured with different parameters. By joining multiple layers you can give the appearance of things like ocean, flatlands, and mountains.

Also, cannot recommend Amit Patel's stuff enough. That guy is a fountain of knowledge for all things gamedev.

Re: Building an Infinite Procedurally-Generated World

#6

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

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.

Re: Building an Infinite Procedurally-Generated World

#7

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

In infinite generation, it's tricky to meaningfully do it. If you can constrain your space, I've had good luck with Voronoi generation and using those as continental plates. A little edge randomness, and I figure out what subducts, what separates, which plates are water and which plates aren't, and so on. Couple this with an iterative erosion mechanic and you can do some neat stuff.

("Look, this is Perlin noise" made this a disappointing article for me. It's the sort of thing you saw on GameDev.Net fifteen years ago...)

Re: Building an Infinite Procedurally-Generated World

#8
post #4

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

http://www-cs-students.stanford.edu/~amitp/game-programming/... was a springboard for many people dealing with this problem. That whole site is worth a read if you're interested in game development at all.

I really like that article - in fact, it's what I followed, using the Voronoi polygons and everything. But when it comes time to draw the coastline, the author just says "there are many ways to do this," without specifying what those ways are (other than using a pizza box or another source).

Re: Building an Infinite Procedurally-Generated World

#9
post #7

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

In infinite generation, it's tricky to meaningfully do it. If you can constrain your space, I've had good luck with Voronoi generation and using those as continental plates. A little edge randomness, and I figure out what subducts, what separates, which plates are water and which plates aren't, and so on. Couple this with an iterative erosion mechanic and you can do some neat stuff. ("Look, this is Perlin noise" made…

Voronoi polygons as plates is probably going to be the best way for me to go - rather than adding a circle, we can just add the distance from the nearest "land" polygon, and sum the noise with that. It doesn't get us interesting geology (which it sounds like you're doing brilliantly) but it will avoid the thousands of little rivers without oceans that we see with straight Perlin noise.

Re: Building an Infinite Procedurally-Generated World

#10

How can we make realistic-looking continents? This project (and Minecraft, which looks similar, in virtue of using Perlin noise the same way) result in interesting and varied terrain for an RPG, but the terrain looks otherworldly or artificial if you zoom all the way out. The same variety that keeps the game from being boring when you're a human-sized observer makes it chaotic and noisy when you have a satellite's vi…

Well, if you had a mathematical model of continent formation from actual geology, you could use some of the noise generation to obtain values for the model's free parameters, and then just run the simulation forward (possibly approximating it very cheaply since you don't need maximal real-world accuracy) to get your continents.

Theres an article series where the author explores this for a little bit, but with water droplets affecting the terrain for erosion[0].

It gets better as he goes along as he talks about adding various terrain features, and eventually also rivers which cut through the landscape.

[0] http://www.shamusyoung.com/twentysidedtale/?p=11874

Post reply on HN