I am making a 2d sandbox game with procedural terrain generation, and for a few weeks, I have used this noise function by joeiddon, slightly modified so I can have multiple noise instances. The problem was that this function doesn't have a seed option, so there's no way to tell it to generate the same world two times. To solve that, I have been googling and coding for a few hours. Eventually, I stumbled upon this function (also slightly modified), which does support seeds. The problem is that when I use this function, there is almost no variation in the worlds. They can all be divided in five categories, and the difference between different worlds in the same category will never be more than a few blocks. So, basically, I either need a way to make the first function work with seeds, or I need to find out why the second function doesn't give enough variation. I don't know if this will help, but here is the code that initializes the noises based on a random seed:
seed = Math.random();
grassNoise = new Perlin(seed);
goldMaxNoise = new Perlin(seed/7);
goldMinNoise = new Perlin(seed/2);
treeNoise = new Perlin(seed*3/2);
cloudUpNoise = new Perlin(seed);
cloudDownNoise = new Perlin(seed*1.2);
coalMaxNoise = new Perlin((seed - 78) / 3);
coalMinNoise = new Perlin(seed*7);
I only use the perlin2 function. Could anyone please point out what I'm doing wrong?