How would one make terrain generation?

I need to know how to make a terrain generation. Like Minecraft, but 2D. Does anyone have a tip or something that can help me out? It would greatly be appreciated.


I dont know if this helps but Im working on a project with random terrain generation
oh and here’s a link to a big convo about it you will probally find something there but dont post in it as it is old and will clog up the other
discussions A Randomly Generated World


I used a similar design as @GGSTUDIOS for my experimental game. Except I added tree generation along with it, but I don’t have a loading screen yet so you kind of see the entire process, lol.

I also made it so once it spawns a grass block it will start spawning dirt and stone so it makes hilly terrain, but also organized generation.