I am making a 2d top-down tile based game, which is randomly generated each new world.
What I want to do is create a Polygon (or other more appropriate shape I don't know of) for each landmass not disrupted by land, basically each unseparated landmass/island, I want to do this for where my player is to spawn in the world, I want to have it so it has a higher chance of spawning on the biggest landmass in the world, rather than spawning on a tiny several tile island. So, all I need to know is how would I create some sort of shape system to recognise different islands.
The reason I suggest a Polygon is because the player would randomly spawn in that area so it has to be accurate to the land, it can't start of by spawning in water nearby.
If a Polygon is obsolete for this idea, and another system would be better let me know.