After a bit of searching, I found that the best way to create an Area2d using a map was the built in function to create CollisionPolygon2Ds hidden in the “Sprite2D” tab. Took a bit of looking around to find that. After doing that, I grouped relevant territories together into Area2Ds (e.g. Australia + Tasmania, most of the Indonesia islands).

The only issue I have with it now is that it combines a bunch of the countries, particularly America (the continent) and Afro-Eurasia. It was pretty bang on for most of the islands though, see Australia, Japan, Madagascar, and New Zealand. Greenland got a bit of Canada so I’ll need to fix that.

I’ve also made a small script that draws a Polygon2D with the correct map colour for . The default is red, so you can see that I have currently set America blue, Afro-Eurasia purple, the British Isles pink, Australia and New Zealand green (the latter being slightly bluer), and Japan yellow. These colours are just for testing and I think it looks pretty good.

I will probably find individual maps for each country and create collision shapes using those for the countries in Afro-Eurasia and America (i.e. almost all of them…). One thing of note, I have split the collision shape of Papua into West and East by duplicating it and manually deleting the points on either side, then putting each half into separate Area2Ds. This is obviously not feasible for Afro-Eurasia and America, but I might do that for Ireland to split the north and south.

One annoying thing is that I can’t seem to select multiple points and delete them all at once in Godot. Anyone know what button to press to do that? Is there some sort of toggle? Another really annoying thing was adding the “territory(dot)gd” script to each and every Area2D, you can select multiple objects and remove their scripts, but not attach (you have to attach one by one…).

here’s what my project looks like:

edit: replaced .gd with (dot)gd…just in case