On 6/5/2018 at 1:55 AM, suliman said:
Any way to automate this process?
Just to be clear, what is being automated?
The game at its core is a connectivity graph. You pointed that out in your own post.
Since this isn't in For Beginners, we assume you know how to manipulate a graph. Manipulating that type of graph is fundamental in computer science, they are included in the earliest data structures and algorithms courses. Often in the first year of studies they start with trees then include more connected meshes.
The other part, creating a connectivity graph out of an image, is not something that can be easily automated. Identifying areas of uniform color is straightforward enough, but anything more than that requires either a human or an enormous amount of computing work. For example, how would you know the British Isles are a single unit, or Indonesia is a single unit? And heaven help the machine that must figure out the mess of northeastern Canada and Greenland.
Don't automate that part. Drop it in an image editor like Gimp or Photoshop, draw boxes around each zone, color each box with an indexed color of 1, 2, 3, 4, etc., and use those to build your clickable regions. When the user clicks on a point, run the coordinate through your indexed image, get the number, and use that to know which node the user picked. (You can use more complicated regions, but there is no need.)