Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
"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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda