DeletedUser
Guest
This is the basic question if you want to make for instance an alliance top 12 map.
In world delta (here) i have presented what I think is the best approach to deciding who is the owner of an island, so what colour an island should be. I took this discussion to here because it might be of interest to other prorammers.
It comes down to this algorithm:
1) Check each island. If an island has a member of the top 12 allies present then remember the island. This gets rid of the islands where top 12 alliance members have no cities.
2) check each island in memory again. calculate the total points of all cities, not counting the cities lower than 1000 points. This makes total city count=100% per island.
3) Calculate the sum of all cities > 1000 for each alliance present on the island.
4) Calculate the relative presence per alliance based on city points expressed in % of total city count.
5) Assign the colour of the island to the alliance that has a presence of 50% or higher.
In addition it would be feasible to calculate some sort of a "world domination factor" based on the presence on islands.
In world delta (here) i have presented what I think is the best approach to deciding who is the owner of an island, so what colour an island should be. I took this discussion to here because it might be of interest to other prorammers.
It comes down to this algorithm:
1) Check each island. If an island has a member of the top 12 allies present then remember the island. This gets rid of the islands where top 12 alliance members have no cities.
2) check each island in memory again. calculate the total points of all cities, not counting the cities lower than 1000 points. This makes total city count=100% per island.
3) Calculate the sum of all cities > 1000 for each alliance present on the island.
4) Calculate the relative presence per alliance based on city points expressed in % of total city count.
5) Assign the colour of the island to the alliance that has a presence of 50% or higher.
In addition it would be feasible to calculate some sort of a "world domination factor" based on the presence on islands.