I don’t know if this is the best way but there’s a noise generator extension.
https://wiki.gdevelop.io/gdevelop5/extensions/noise/
I made a little test example.
Try me. The top slider controls the density and the bottom changes the random seed number.
https://gd.games/keith_13579/witty-porter
At the beginning, you add a generator
You use 2 repeats to create a grid using X and Y.
I used the new local variables but they can be scene.
The first slider is setup with
Min = - 1
Max = 1
Step size = .01
It uses compare 2 numbers to compare the noise
Noise::Noise2d(“grass” , X, Y)
To the slider and creates a blade if the noise is greater than the first slider it adds a grass or for my test a block.
The second slider simply sets a random seed. You can use any range of numbers. It just needs a seed value. This allows for the sequence to be repeated.
The size can be adjusted. The steps and number of repeats. You could use variations by using different colored grass or change the size.