How would you make a 2D procedural world generation?

Godot Version

4.7

Question

I wanted the make a procedural world generation in 2D in the same way 2D MInecraft or Terreria but i don’t know where to start.
If godot have classes or nodes that makes this easier or not
The most parts that puzzles me are: how would i be able to render a lot of sprites at the same time? how would i know where each block is at? and how would i be able to integrate physics or navigation
Any tips would be great

Use TileMapLayer node(s)

but what about performance? i assume having multiple blocks would make it laggy

Don’t assume - profile it. Tile map layers are optimized for performance.

alright it’s worth a shot i’ll try that thank you, but say if i do run into performance problems what are tricks i can do to make the engine draw less? i know there’s a node that hides other nodes when they’re not visible

A common optimization is breaking a large maps into chunks and draw only the chunks that are currently visible.

If you haven’t already you should look into how to use fractal noise to generate your maps. During map generation it looks at the dark and light spots on the noise and places tiles based on the values in that noise.

Here’s a tutorial that goes over it. This one goes over 2d which is what you want. 3d is pretty well the same except of course, you’re looking at 3d fractal chunks.

thanks! i actually started doing something similar to thing but this video will guide me in the right direction

I’d use Gaea Documentation