
Building an Infinite Procedurally-Generated World - philk10
http://spin.atomicobject.com/2015/05/03/infinite-procedurally-generated-world/#.VUethn2JVgY.hackernews
======
eigenbom
Perlin Noise is a cheap way to get repeatable and smooth randomness but should
just be one tool in a world generation toolbox. I think most infinite worlds
quite quickly collapse in 'interestingness' because after travelling for a
short while in any direction you quickly see that there is nothing new out
there.

So, instead of creating infinite worlds I'd like to see a lot more focus on
procedurally-generating very interesting finite worlds. For games with a
simple 2d tile-based grid, we then don't have to limit ourselves to just
crafting noise-based functions -- as we can create the entire world at once.
Games like Dwarf Fortress, Spelunky, Nethack, Terraria, etc., all follow this
approach, and I'm trying to do the same in my own game, Moonman. So get our
your IDEs and start creating house, face, forest, creature, item, and cloud
generators. :)

~~~
BFay
I agree that using one technique for an infinite world is probably going to
get boring pretty quickly, and you can probably get more leverage out of a
finite world.

But even with an infinite landscape, I think you could improve the variety by
using a generator at different scopes - if your landscape is just one constant
type of terrain, like a field, things will get boring. You might have a wide
variety of rivers and trees, but the basic idea is the same. But if you have
another generator controlling the terrain type - going between plains, desert,
mountains, etc., that would be really interesting. At the small scope,
variation in trees and water is still the same level of change, but there is
also a larger scope that changes the overall feel at a much larger radius.

~~~
eigenbom
Oh definitely. Minecraft does this in a simple but effective way. Though the
interestingness of the landscape lasts until you've seen a few instances of
each type, and then you have a model of the system in your mind, because it's
just a few simple functions composed together. There is a lot of fun stuff to
do so the terrain is only just the backdrop to that fun.

Instead of {noise(x,y)>0.5 = desert} let's simulate eons of weather,
geological events, floods, and then feed that back into the lore of the game
world. Dwarf Fortress is one of the few games I'm aware of that attempts this
level of world generation. Unfortunately it's quite impenetrable as a game,
due to its complexity.

------
newobj
Really wish people using Oryx sprites would credit Oryx. And the ultimately
irony is when people claim that the sprites are ripping off Realm Of The Mad
God, which of course, itself, was initially based on... Oryx sprites.

~~~
fapjacks
I don't see any free or open source sprites. There is nothing on the website
indicating that they are free or open source. Are you asking someone to credit
the creator of sprites they paid money to use? That's absurd to me. It's like
wanting this guy to credit Verizon or Time Warner for the bandwidth he paid
for. If Oryx sprites were open source, or free for noncommercial use, I think
it would be a legitimate claim. Otherwise, not so much, because it boils down
to advertising. Crediting someone else is advertising someone else, and I
believe giving someone actual money automatically means they don't need to
also advertise for them.

~~~
ksmiley
The little man in the screenshot is from the "LOFI Fantasy 2D/3D" tileset[1],
which has a CC BY-NC-ND license. After a quick look around, doesn't look like
it's available on Oryx's site any more, however.

[1]:
[http://forums.tigsource.com/index.php?topic=8970.0](http://forums.tigsource.com/index.php?topic=8970.0)

------
presidentender
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?

~~~
nbm
[http://www-cs-students.stanford.edu/~amitp/game-programming/...](http://www-
cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/) 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.

~~~
presidentender
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).

------
halflings

        Once you have access to random 2D data, it’s pretty straight forward to convert that noise into usable data. Simply set up thresholds for each tile type you want to support, eg:
         
        * water if < 0.3
        * grass if >= 0.3 and <= 0.6
        * mountain if > 0.6
         
        I recommend leaving the upper and lower cases open. If they are not left open, you may end up with holes in your map for unexpectedly high or low values. An alternative is to clamp or scale the noise values when you generate them.
    

If you expect to have more tile types, you should probably consider a
categorical probability distribution (something like: water: 0.3, grass: 0.3,
mountain: 0.4) and sample from it (instead of "hard-coding" it with the test
you're referring to)

~~~
shawn42
I like your idea here. I think the downside of this approach is you must scale
your random data points by a scaling factor to get them in a known range.

------
realrocker
What good luck I have! I have been fiddling with a procedurally generated 3d
world and there are all these great articles about procedural art up on HN.
Anyone know of an example project for a procedural 3d world?

