I'm trying to create a terraria like terrain with SDL2 and C++. For generating the terrain I'm trying to use the 1D noise function from here: https://github.com/SRombauts/SimplexNoise
It's pretty basic and only takes a x value. I've been messing around with it for a while but can't work out what to pass into the function as the x value. I first tried passing just the x value of the column I'm finding the noise for. This just returned 0 every time. Next I tried passing a value between 0 and 1, so I passed it x / width
. This sort of worked, but the wider I made the terrain, the more spaced out it became.
Hope you understand, what I do give the function for the x value? Thanks in advance.