I’m doing grand strategy like Hearts of Iron 4, Europa Universalis 4. Specifically now I have a question on how to make the boundaries between provinces like in those games.
Initially I wanted to calculate each pixel in the texture, if the previous calculation and this pixel is different then you need to create a border. However, I used a map size of 1024x1024. Which requires 1048576 calculations. I have even 10K calculations in a few minutes, but a million. Whereas Paradox games use a map size of 5632x2048 (This is Europa Universalis 4). Which amounts to 11,534,336 pixels, and accordingly the calculations. This could take days. Nevertheless, it takes a few minutes to load paradox games on HDD. So I just can’t seem to figure out how to do it. The boundary itself I was planning on doing with a spline, the points would be put where the boundary changes its direction.
I think there must be an easier way to create these boundaries, maybe someone has an idea? Specifically on this topic I could not find on the Internet. Either had to dig very deep.
When playing Europa Universalis 4, I found the moment where the boundaries were incorrectly generated (usually they are bilateral, an example, too throw below). Also I will throw below a map that contains information about the provinces. However the site doesn’t allow for uploading heavy images, so I cut it down to size so you can compare this map to the actual map. In addition to all of this I have added a province map I made for my game. I use this as material for the plane, which has a collision but is hidden. It is sized so that 1 pixel equals 1 unit in the engine.
Thanks in advance for your help!
This is the point where the boundaries were not generated correctly. Maybe it can help you in some way.
provinces_namibia.bmp (183.4 KB)
This is a province map area that has had problems generating provinces. I also think it might be of some help to you. It is made in BMP format.
This is an example of what boundaries should look like.
This is my province map. Maybe it can be of some use to you.
If there are any questions. For maybe I have not fully clarified some points. I will be happy to answer those questions.