This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
+1 vote

How can I achieve such detail like Terraria's world? How did Terraria make such a detailed world? World Below: enter image description here

in Engine by (455 points)

1 Answer

+1 vote

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)https://www.redblobgames.com/maps/terrain-from-noise/

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

by (47 points)
edited by

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.