I’ve managed to use a perlin noise generator to generate a random 512x512 map.
If the value the noise spits out is lower than 125, for example, the tile will be water. Otherwise its a land tile.
What I’m trying to do is scan over the map, detect and remove any island that touches the edges, also if the surface area of an island is below say 45 then remove it. Any ideas?
Could I for loop over the map, detect a land tile (that hasn’t already been filled) and start filling adjacent tiles. If I can’t fill any more I must assume that area is an island. If any of the land tiles are y:0, x:0, y:height or x:width, remove the island as it touches the edges.