I believe this question can help beginner game developers. I've looked through a dozen or so answers on perlin noise here and on Stackoverflow, and found only 1 concrete implementation of perlin noise that I have listed below. There's a lot of advice, but it's hard to translate into what I have to do with X and Y values, and if I have to do this at all times, or only when I want specific features to appear.
Here's what I got from Stackoverflow: I believe this was advised as mixing various noise octaves. It seems to generate a fairly interesting terrain, although it rarely generates mountains for me.
float perlinNoiseValue =
+1/15.0* fabsf([generator perlinNoiseX: perlinX y: localYIndex z: 0 t: 0])
+2/15.0* fabsf([generator perlinNoiseX: 2*perlinX y: 2*localYIndex z: 0 t: 0])
+4/15.0* fabsf([generator perlinNoiseX: 4*perlinX y: 4*localYIndex z: 0 t: 0])
+8/15.0* fabsf([generator perlinNoiseX: 8*perlinX y: 8*localYIndex z: 0 t: 0]);
I'm looking at this answer on Perlin Noise by Byte56, and it's hard for me to translate verbal descriptions into what I have to do with X/Y inputs. Can someone provide concrete examples, along with descriptions of what terrain features such noise generates?
For example, does mixing noise by picking the max value equates to something along the lines of
float perlinNoiseValue1 = fabsf([generator perlinNoiseX: perlinX y: localYIndex + 300 z: 0 t: 0]);
float perlinNoiseValue2 = fabsf([generator perlinNoiseX: perlinX y: localYIndex z: 0 t: 0]);
float finalValue = fmax(perlinNoiseValue1,perlinNoiseValue2);
Do I always pick the max value in the case above, or only in some cases when I want a certain feature to manifest?
Does flatter terrain look like ?
float flatterTerrain = fabsf([generator perlinNoiseX: perlinX y: 0.2*localYIndex z: 0 t: 0]);
Does wider valleys and hills look like?
float widerValleys = fabsf([generator perlinNoiseX: perlinX*3.0 y: localYIndex z: 0 t: 0]);