Discuss Scratch

wrestling9
Scratcher
56 posts

Perlin Noise / Simplex noise in scratch

Hey everyone! I've gotten interested in 2d terrain generation, and would like to implement some very basic perlin noise to generate it. How should I do this? I've used prebuilt noise functions before, and I kind of understand how it works, but never wrote one myself. thanks!
Herbin12
Scratcher
100+ posts

Perlin Noise / Simplex noise in scratch

Here's a short example I made:

https://scratch.mit.edu/projects/394322754/
gilbert_given_189
Scratcher
1000+ posts

Perlin Noise / Simplex noise in scratch

Herbin12 wrote:

Here's a short example I made:

https://scratch.mit.edu/projects/394322754/
Yes, but this is not Perlin noise or Simplex noise. This is an example of a Perlin noise. (on a 2D array)

If you want to know about Perlin/Simplex noise, these Wikipedia article might help you:
Perlin noise
Simplex noise
wrestling9
Scratcher
56 posts

Perlin Noise / Simplex noise in scratch

Thanks, I'll look into it.
BillNyeTheKGBSpy
Scratcher
68 posts

Perlin Noise / Simplex noise in scratch

Is Perlin Noise a specific algorithm? Or is it a synonym for random terrain generation? You can make a terrain generator with this block
(pick random () to ())
gilbert_given_189
Scratcher
1000+ posts

Perlin Noise / Simplex noise in scratch

BillNyeTheKGBSpy wrote:

Is Perlin Noise a specific algorithm? Or is it a synonym for random terrain generation? You can make a terrain generator with this block
(pick random () to ())
Yes, that would work, However, that will make a very rough and spiky terrain, and doesn't make the smooth noise the usual Perlin noise would.
Here's the picture (again):
BillNyeTheKGBSpy
Scratcher
68 posts

Perlin Noise / Simplex noise in scratch

gilbert_given_189 wrote:

BillNyeTheKGBSpy wrote:

Is Perlin Noise a specific algorithm? Or is it a synonym for random terrain generation? You can make a terrain generator with this block
(pick random () to ())
Yes, that would work, However, that will make a very rough and spiky terrain, and doesn't make the smooth noise the usual Perlin noise would.
Here's the picture (again):
I honestly have no clue what that picture represents, it looks like a carpet to me. A very blurry carpet.

Last edited by BillNyeTheKGBSpy (May 20, 2020 16:43:47)

BillNyeTheKGBSpy
Scratcher
68 posts

Perlin Noise / Simplex noise in scratch

Here. I found a project that you could look into. https://scratch.mit.edu/projects/392769129/
Oumuamua
Scratcher
1000+ posts

Perlin Noise / Simplex noise in scratch

DJH666666
Scratcher
7 posts

Perlin Noise / Simplex noise in scratch

simple get a whole bunch of sound pick random ones play the selected ones together and use the volume thing to draw a volume map then fill the volume map in BOOM! perlin noise sorta
celleron56
Scratcher
89 posts

Perlin Noise / Simplex noise in scratch

DJH666666 wrote:

simple get a whole bunch of sound pick random ones play the selected ones together and use the volume thing to draw a volume map then fill the volume map in BOOM! perlin noise sorta
althought the generation progress would be loud xD
bSpyder
Scratcher
100+ posts

Perlin Noise / Simplex noise in scratch

You could use a
(pick random (_) to ()))
for the first pixel or value, then make slight alterations for every other pixel

I made this thing that kinda follows this rule, it could easily be implemented or changed to create smooth noise
https://scratch.mit.edu/projects/589946056/
Spheric_YT
Scratcher
31 posts

Perlin Noise / Simplex noise in scratch

bSpyder wrote:

You could use a
(pick random (_) to ()))
for the first pixel or value, then make slight alterations for every other pixel

I made this thing that kinda follows this rule, it could easily be implemented or changed to create smooth noise
https://scratch.mit.edu/projects/589946056/
So, we need a
(pick random (a) to (b))
then make smaller alterations for each and every pixel. Am I getting this correct?
PheloOrSomething
Scratcher
4 posts

Perlin Noise / Simplex noise in scratch

My best approach would be:
set [currentHeight v] to [5]
repeat [10] // changeable
change [currentHeight v] by (pick random [-2] to [2]) // these are also changeable
do some rendering with the blocks
end
Hope this helps!
Enigma_Ezra
Scratcher
500+ posts

Perlin Noise / Simplex noise in scratch

Powered by DjangoBB