I have a 2D project with world generation on an array, I figured out how to generate the top layer (grass) and bottom layer (dirt) and I want to add water generation.. but I don’t know how to implement it... I need water to appear with sand, that is, to begin with, one layer of sand is generated and on top of the sand there is water, and after that there is earth again... I hope I was able to explain.
https://drive.google.com/file/d/1TxkYZGoSq_gLlgBeZxO0mgISQOI4HyZK/view?usp=sharing
I can't open your prj because I don't have seed plugin,
But you could just randomly spawn water at x, y-1 or more. This will randomly produce a cube above sand. Make sure that you only create tiles if array cell is 0 or less.
but to have a lot of water,
waterSpawn = 0
set waterspawn to choose(0,1)
for 0 to waterSpawn
loopindex = 0 create tile sand at xy
loopindex = 1 create water tile at x, y-1
Hoe you can figure out other things from this example. you can add more loops.
If you want water pool you probably need to first make a random choice, then repeat maxWater times for y - loopindex("maxwater")
For sand above same logic, just more coding.