Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

189
Views
"Varying" noise function

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!