Pls help me with water in game. I like to see water like in Rimworld:
but i dont know how to do that. I have code ( not (0, 1000) its (0, 10)):

but it doing terrain like that:
what i need to add in code for making big lake? PLS HELP D:
Pls help me with water in game. I like to see water like in Rimworld:

Procedural generation can be a pretty expansive topic - there are a lot of methods/algorithms with varying results. The internet is loaded with examples/tutorials.
Currently, you’re using one of the simplest - random placement of a single tile.
What you need is a more intelligent algorithm - something that will place a whole lake. A few options, from simple to complex
1. Spawn a rectangle of water tiles at a time instead of just one tile.
Now, this is kind of boring - you’ll get big lakes, but they’ll all be perfect rectangles.
First set all tiles as dirt. Then, decide randomly the dimensions of your lake. Randomly pick a tile to start the lake, and then set those next to it as water until your reach the proper size. ie:
int x = Random.Range(0,width);
int y = Random.Range(0,height);
int lakeWidth = Random.Range(1,maxLakeWidth);
int lakeHeight = Random.Range(1, maxLakeHeight);
for(int i = 0; i < lakeWidth; i++)
for(int j = 0; j < lakeHeight; j++)
tiles[x+i, y+j].type = Tiles.TileType.Water;
Note that that code doesn’t take into account the boundaries of your array/map. That’s something you’ll need to add so you don’t go out of bounds.
2. Random Walk (Drunkard Walk)
An algorithm where you also pick a random starting tile and how many water tiles it should contain, but from there, things get more random. Follow the link, it offers a good example. Downside: the shape of the lake can be very stringy - like a tree branch.
3. Combine the 2
Spawn a rectangle lake, and then do a few little random walks around the edges to expand the lake and make it less uniform.
4.Look into procedural generation using noise
Generate a heightmap using some sort of random noise function (Perlin is one of the most well-known). Choose a height to represent sea level. Everything below that point will be contain water tiles. If you don’t understand a whit of what I’m saying, hit up Google - there are some great tutorials out there on terrain generation using Perlin.