Today was tree planting day. At first I was like, OKAY GIVE EVERY TILE A TREE WITH A CHANCE of 0.5, but that looked but ugly, so I thought of something else. I changed up my "Map generator" a bit so that instead of giving out "Tiles" it gives out a value between one and hundred, and I do the title choosing in my "TileGrid" class (which makes a lot more sense).
Now, to plant my trees, I seeded another world, and used the values of the mapgenerator to choose where to place trees. This way, just like I use the map generator to make water appear together, with sand at the edges, I now use it to make trees appear together, with bushes along the edges. It works pretty fine! Here is a screenshot of the world zoomed out:
As you can see the trees form nice little woods! Which is pretty cool.
I also split all the parameters of my map generation so that I can easily load different "prefabs" for different terrains, and I added another bit to the terrain creation, for more randomization, which is what I dubbed "Cliff" generation, it works kind of like this:
This piece of code makes it possible to create nice islands, here's an example of my island biome:
As you can see, the cliff script is still, pretty ugly, I circled in red the ugly sudden rock formations it creates so I will have to tweak that to make it better. My goal with this addition is to make it possible for cliffs to appear next to the water (So that I can later add pretty waterfalls), but it isn't working yet : (. I'm thinking of doing something with "Erosion", evening out the low slopes, and extremizing the high slopes, but I'll have to look into that
Here is my swamp "biome" which does look pretty:
It's "initialization" code looks something like this: