Author Topic: Low detail frontiers data that includes all countries (Globe Edition)  (Read 101 times)


  • Newbie
  • *
  • Posts: 14
    • View Profile

The Globe Edition can switch between a high detail and a low detail version of the frontier details.

For an educational game, I would like to support as many devices as possible. The high detail version produces way more mesh data, and because of that it is pretty much incompatible with older / cheaper devices. The low detail version looks nice and runs well (getting 60 fps on testing devices that get below 10 with the high detail version), but it excludes many countries, which simply does not work for an educational game.

So the request is:
To include a low detail version of the frontier data, which includes all countries. I realize this will produce a slightly bigger mesh, but it should still be WAY smaller than the high detail version.

I imagine this being useful for non-educational games as well. Because my usual instinct is to switch between the low and high detail version based on device performance. But currently, both are incompatible for any sort of gameplay, since they have different sets of countries (and resulting from that, also different neighborhood relationships).

Bonus request:
A low detail version of the province frontiers (matching up with the low detail country frontiers) would also be very useful. If that means some provinces are made up of only 4 edge points, so be it. Still way better than not running on slower devices at all.
« Last Edit: April 10, 2021, 12:29:21 PM by BreadAndButter »


  • Administrator
  • Hero Member
  • *****
  • Posts: 7103
    • View Profile

The Map Editor includes a Douglas-Peucker simplification algorithm that you can use to replace the default low resolution geodata:

- Open the Map Editor and ensure you have Frontiers Detail set to High.
- Right click on the gear icon of the Map Editor component and select "Create Low Definition Geodata File":

This will overwrite the low definition geodata each time you use it (you can always reimport this from the original package if you need the original files).

The simplification algorithm accepts an "epsilon" value that determines the roughness of the simplification. The lower the value, the more details will be preserved. By default it uses a value of 0.1 which results in a total of 190 countries (the high definition includes 243, however a few of those are not considered countries as they're "special" places).
Feel free to try different values, for example, 0.01 or even lower. And also compare the size of the resulting file with each value.

You can modify it in WorldMapEditorCountry.cs, in the GetCountryGeoDataLowQuality() method:

allPoints = DouglasPeucker.SimplifyCurve (allPoints, 0.1);