How to world generate a world like Terraria's?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jujumumu

How can I achieve such detail like Terraria’s world? How did Terraria make such a detailed world? World Below:

:bust_in_silhouette: Reply From: God Of Theory

Games like this(terraria) and Minecraft generate the world procedurally using some noise algorithm(perlin noise,simplex noise,etc),so it doesn’t need to save where every object is in memory…

The way I’ll do is this:
1)create all the object that can be added into the scene first
2)In the main scene,use 1d simplex noise to calculate the height along the x-axis
3)if it’s under the height for generation,I’ll create another simplex noise to determine what block to place at that point.
4)create more noise to add more details.U can use your creativity to partition the world and add some rules to determine how u want to design the world,u can take various other factors into account also.
5)for the floating part and some random out of place stuff,I think u can create algorithms to generate them,such as generate_dungeon()orgenerate_floatingLand()

Btw,in Godot,there’s a built in noise called open simplex noise,I’m sure there’s many tutorial and documentations online,just go search about it…

Some helpful links:
1)https://godot-es-docs.readthedocs.io/en/latest/classes/class_opensimplexnoise.html
2)Making maps with noise functions

Hope it helps…I’m not really good at answering,but this is more or less how I generate my world.

How do you make 1d noise a border for a 2d noise?I’m dont understand this.

pickaxeofpixie | 2020-08-29 17:12