10 random tiles are generated at the start (these are the seed tiles)
A sprite is moved randomly about empty areas. (I have 4 to speed things up)
It looks at neighbouring and diagonal tiles and places tiles at it’s location if it sees a tile.
The tile placement rules are too long to explain, they’re in the code if you’re interested.
After 4 seconds, the tiles are all filled so no more generation
But there a still a bunch of mistakes so 2 more sprites go to clean up the sand tile placement.
Feel free to mess about with the code, try larger and smaller tilemaps and see if you can make some better tile generation code lol
Read me if you want to edit the code
This function should be adjusted to follow the dimensions of the tilemap
Change the repeat number to adjust the number of seed tiles
Change the frequency of the seed tiles by adjusting the array after the dark blue tile (keep order from 0-4 in the array)

What number corresponds to what tile for the set tile and if tile next to functions