Welcome to the Dev Section.

Here I will go a bit more in-depth on my projects

Nationwider

C++ Version

The Nationwider tool rewritten in C++, using SDL3 as a graphics lib, with optional AWS integration for hosting savefiles.

You can read more about the concept at nationwider.fyi


Main Functionality

Now, the main Nationwider program relies on this hierarchy of layers.

The layers consist of these types: Terrain, Political, Icon.

Terrain

Terrain layers can have the "upper" or "lower" trait which determines what level of detail the respective layer is at. Imagine it as the same system of "LODs" where the "upper" layer is a lower detail (thicker pixel) representation of what the higher detail layer would be.

As a simple example, imagine a country on a map being roughly 100 pixels in length, now in an "upper" layer, that would be, for example, 10 pixels in length. a 10:1 ratio if the chunks are 10 pixels wide. This can be adjusted with how big the host decides to make the chunks.

Political

Political layers have only one size, the "upper" size - this is a design choice. It functions by creating a texture of one color, the "wilderness" representation, and then creating a second less-opaque texture on top to show where the water is, leaving visible blank landmasses. Now when you go and color the political layer, the layer automatically darkens the areas where you color onto water, representing occupied or enforced waters by a player.

The double-texture method also helps with making the saving process much easier by not having to lighten the color where it's on water to read and save as a color index byte.

Icon

The Icon layer has no size, technically. It's simply a vector (or deque specifically) storing icon objects, which get looped through and rendered onto visible screen-space.


AWS S3 Functionality

Minimal python scripts are used to check for a server key in a json file and then download a list of savefiles in the cloud (S3 buckets). Each host would have to set up their own S3 bucket to host the savefiles and make an API key for the users so they could download the maps, and only the host would have the API privilege to upload maps.

The main program calls to this executable to read the keys and list all savefiles into a shared text file.

In the main program you then go ahead and select a local or online savefile and if it's online, it calls to this script to download the selected savefile as a temporary and load it into the program.

Then in the case that the host is editing the map and decides to publish it to everyone to download, this script comes into play. And by passing an argument as a filename of the locally saved file, the python executable reads that argument as a filename, finds the referenced file, and uploads it to the S3 Bucket.

Based on the patience of the host, they can choose to either have one master API key for every user to use in the community, or create a separate API key for every single player.