Discuss Scratch

Blue_Random
Scratcher
28 posts

Pseudo-random terrain generator / (Perlin noise ?)

So I basically need a pseudo-random (meaning seed-based) terrain generation to:
  • randomly place objects on a map (trees)
  • have a height-map in my 2-D world in order to make matural “lakes” and seas.

Searching around the web I got a solution for the first point, and I heard of perlin noise for terrain and textures generation.

Reading the wikipedia article for perlin noise, I also figured out that it could finally also be a better solution to my first “problem”, since it could able me to form irregular trees repartition on the map, forming kind of “bosks” and forests.

But it seems pretty complicated, so could anyone help me with all of that ? Is perlin-noise even a good solution for my problem ? And if yes, how may i implement it ??? Thanks !
Wettining
Scratcher
500+ posts

Pseudo-random terrain generator / (Perlin noise ?)

Blue_Random wrote:

So I basically need a pseudo-random (meaning seed-based) terrain generation to:
  • randomly place objects on a map (trees)
  • have a height-map in my 2-D world in order to make matural “lakes” and seas.

Searching around the web I got a solution for the first point, and I heard of perlin noise for terrain and textures generation.

Reading the wikipedia article for perlin noise, I also figured out that it could finally also be a better solution to my first “problem”, since it could able me to form irregular trees repartition on the map, forming kind of “bosks” and forests.

But it seems pretty complicated, so could anyone help me with all of that ? Is perlin-noise even a good solution for my problem ? And if yes, how may i implement it ??? Thanks !
What would you be making this in?
Is this an out of Scratch project (possibly being made in Javascript, C, C++, etc.)
or are you trying to make this in Scratch?
Blue_Random
Scratcher
28 posts

Pseudo-random terrain generator / (Perlin noise ?)

Wettining wrote:

What would you be making this in?
Is this an out of Scratch project (possibly being made in Javascript, C, C++, etc.)
or are you trying to make this in Scratch?

Oh well that's a good question
So yeah I'm actually making this in Scratch, elseway I would have just posted in the out-scratch forums.

For now I ended up interpolating pseudo-random values generated with an algorithm tha I found and works very properly, I'm still opened for better suggestions though
Wettining
Scratcher
500+ posts

Pseudo-random terrain generator / (Perlin noise ?)

Blue_Random wrote:

Wettining wrote:

What would you be making this in?
Is this an out of Scratch project (possibly being made in Javascript, C, C++, etc.)
or are you trying to make this in Scratch?

Oh well that's a good question
So yeah I'm actually making this in Scratch, elseway I would have just posted in the out-scratch forums.

For now I ended up interpolating pseudo-random values generated with an algorithm tha I found and works very properly, I'm still opened for better suggestions though
Are you doing 3D or 2D?
Wettining
Scratcher
500+ posts

Pseudo-random terrain generator / (Perlin noise ?)

Also I don't think Perlin Noise would be good for Scratch. It's very computationally demanding and can be slow so running it in a browser wouldn't be the best.
I would recommend Simplex Noise
Blue_Random
Scratcher
28 posts

Pseudo-random terrain generator / (Perlin noise ?)

Wettining wrote:

Also I don't think Perlin Noise would be good for Scratch. It's very computationally demanding and can be slow so running it in a browser wouldn't be the best.
I would recommend Simplex Noise

Yeah so as I was saying I just forgotten this idea for now, I'm just using a pseudo-random number generator, then bilinear interpolation.
Also the map render as 2D (tile based game), tough I need a height-map to generate lakes and mountains within the world.
Wettining
Scratcher
500+ posts

Pseudo-random terrain generator / (Perlin noise ?)

Blue_Random wrote:

Wettining wrote:

Also I don't think Perlin Noise would be good for Scratch. It's very computationally demanding and can be slow so running it in a browser wouldn't be the best.
I would recommend Simplex Noise

Yeah so as I was saying I just forgotten this idea for now, I'm just using a pseudo-random number generator, then bilinear interpolation.
Also the map render as 2D (tile based game), tough I need a height-map to generate lakes and mountains within the world.
What are you using to differentiate between two tiles (e.g. are you making it like a color difference, tile difference, shade difference, or just ID difference)
Bazarr
Scratcher
12 posts

Pseudo-random terrain generator / (Perlin noise ?)

I made a 1D Perlin noise if you end up using please shoutout too

https://scratch.mit.edu/projects/399435776/

when i see spaghetti
repeat until <spaghetti is empty>
eat spaghetti
end
ask for more

say [broken]::pen hat

Powered by DjangoBB

Standard | Mobile