Currently im working on Terraria clone in SFML and was wondering how I should approach terrain generation. After looking into it for a bit I found libnoise and was able to create this heightmap:
The problem is I dont know how to proceed after that. I dont know how to turn it into a 2D form of terrain and then be able to turn it into something I can use tiles with like a numerical array.
I dont know if im making this harder than it seems but I was also thinking of randomly filling a 2D array and using that for my terrain instead but I dont know how to limit the range that certain blocks may appear on for example like grass only being at the top, etc.
If you can help me with my suggestions or have any of your own, your help will be appreciated.