Noise (Advanced)

Is there youtube tutorial or something?

idk but i'm trying to tell you to make a bigger height map using noise and set a sea level so some areas would be lower than the sea level and therefore be in the ocean

and the ocean floor is generated the way same land is

and you asked for a diagram and i attempted to make a diagram showing this

You only showed the result @pumpkinhead...
Your supposed to show how the whole concept works

how else am i supposed to show you the concept of using noise to generate a heightmap????????????? do you want the code i used to make those visuals here

const noiseScale = 0.005;
const noiseAmplitude = 0.4;
const oceanHeight = 0.2;

function setup() {
  createCanvas(800, 400);
  noiseDetail(10, 0);
  noLoop();
}

function draw() {
  background(220);

  for (let x = 0; x < width; x++) {
    let noiseVal = noise(x * noiseScale) * noiseAmplitude;
    let y = noiseVal * -height + height;
    
    
    if (noiseVal < oceanHeight) {
      stroke(0, 0, 255);
      line(x, y, x, height * (1 - oceanHeight));
    }
    
    if (noiseVal < oceanHeight + 0.01) {
      stroke(255, 200, 0);
    } else {
      stroke(20, 200, 50);
    }
    line(x, y, x, height);
  }
}

and i was telling you the concept

Just contact me on repl.it at Coder2195Text

@bh this is NOT an offsite meeting...
@bh This is not a meeting at all... Since we just coding together

here's a little project I made a while ago trying to accomplish Perlin noise in Snap: https://snap.berkeley.edu/project?user=jens&project=3D%20Perlin%20Noise

This is now simple due to Simplex Noise
But I just don't know how to generate oceans...
I need a tutorial or very clear explanation

look at that project I shared. There's a second script in there - when the space key is pressed - that makes oceans and islands. it uses a threshold on the gradient to decide on the output color.

Remember this is a 2d game
ocean generation is tricky

eh? no, it's not! The beautiful thing about noise is that it's just a gradient function. Literally just set a threshold for a color, that's it!

Hmm lemme search some methods up

That's exactly what a meeting is!

Ok then

I'm not quite sure if you're understanding how to use noise? You keep saying that it's a "2d" game when you are showed 2D noise instead of 1D noise. But you can say that 1D noise is a certain line cross-section of 2D noise. And you can say 2D noise is a certain plane cross-section of 3D noise. And you can say 3D noise is a certain cube cross-section of 4D noise.

This is a function to get 2D noise: noise(x, y)
This is a function to get 1D noise: noise(x)
This does the exact same thing as the function to get 1D noise: noise(x, 0)
0 is an arbitrary number, it only matters that it's constant.

Anyway, jens and I trying to say when you get a noise value, if it's below a certain number then it's ocean, and if it's above a certain number then it isn't ocean.

I'm trying to explain this the best I can

Hmmm but simplex noise only supports 2d and above how do I get 1d noise

In simplex noise? lemme try that...

wait what i'm assuming you're trying to make it like paper minecraft by griffpatch...
but then how do you not know how to use 1D noise? what were you doing before?

Simplex noise only supports 2d 3d and 4d noise

yeah but i said you can emulate 1D noise by doing this

const num = 0;
noise(x, num);

didn't you read
what i said