The age old question for EU4 map staring developers (or at least me) is asking how the game transforms a relatively low resolution map where each prov

Simulating the EU4 map in the browser with WebGL

submited by
Style Pass
2021-08-23 12:30:03

The age old question for EU4 map staring developers (or at least me) is asking how the game transforms a relatively low resolution map where each province is coded with unique color:

With our goal established we’ll first explore previous methods that I and other developers have used to simulate EU4’s maps (and other games by Paradox Development Studio like Hearts of Iron, Crusader Kings, and Victoria).

The most intuitive approach, which I’ll call the pixel approach, is to take the raw, province color coded image and fill each province appropriately to create a bitmapped image. This is how the map was previously architected in Rakaly as well as the community made Map Viewer and Savegame Editor. There are a significant amount of APIs and libraries for working with pixel images, so one can get quite far with this strategy and produce an image like so:

But most would agree that the image is too small for all use cases, so we need to scale it up. Let’s see what 3x scale produces.

Leave a Comment