I am making a 2D procedurally generated game like Terraria, and I want my terrain to be smooth similar to how games like Hill Climb Racing look. I have a Tilemap that renders my tileSprites and a 2D array that stores my TileClass information. My current terrain looks like this:
I want my smooth terrain to look something like this:
My current approach is to render a smooth line with Bezier curves, but I don't know how to assign the vertices properly since I also have cave systems underneath the surface that I want smooth as well.
Also, does anybody know how I would assign a texture to the line at different places? My terrain has different blocks like grass, dirt, and stone, to name a few, and I want the smoothing texture to match the block it is next to.
I have tried many YouTube tutorials and even ChatGPT for help, but nothing has been niche enough to help me.
Any help would be greatly appreciated. This is my first post on here so let me know if more information is needed. Thanks!!