
Vector tools can’t handle this out of the box as evident by this Graphic Design question.īut there are successful projects that use this approach: A big stumbling block is deriving an algorithm that will convert the game images to a vector equivalent. Many abandon the pixel base approach and reach for the next tool: vector graphics. Simplicity of this approach often aids performance.The pixelated image is satisfactory for some but leaves enough to be desired for others to seek alternative methods. Pixelated image scaled with nearest neighbor Thankfully, the web exposes alternative image scaling algorithms through image-rendering, and we can select the crisp-edges value to preserve the necessary contrast. How browsers upscale images is implementation specific, but by default, firefox uses bilinear interpolation which is better suited for photography. Let’s see what 3x scale produces.īy default the browser will produce a blurry image:īlurry image scaled with bilinear interpolation Provinces filled with some province border detectionīut most would agree that the image is too small for all use cases, so we need to scale it up. 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: This is how the map was previously architected in Rakaly as well as the community made Map Viewer and Savegame Editor. 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. 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). So EU4 creates a significantly upscaled view for the player.

In game representation of the eastern baltic sea region Into a much richer experience once in game (the image below can be clicked to show the true size): 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:ġ:1 section of game map focused on the eastern baltic sea region Simulating the EU4 map in the browser with WebGL Published on: August 23, 2021
