by SOVEREIGN team
In many strategy games, trade was long a number in a table. In SOVEREIGN it lies on the map – and it has consequences you can see.
From surplus to flow
Every nation produces some goods in surplus and needs others. Every week the simulation connects exporters and importers into trade flows. Partners are preferred when they are close, in the same economic union or in the same alliance. For each good, a nation keeps only its strongest partners, and changes take effect gradually over several weeks.
A flow's route is the shortest path from the exporter's hub – its capital province – to the importer's hub. Sea lanes are cheaper than land routes, ports add a surcharge, and whoever crosses a narrow land bridge and loads a ship again pays for transshipment. So flows take the routes you would draw in an atlas.
Chokepoints
The game detects straits and canals mechanically from the map: Gibraltar, Dover, the Bosporus, Suez, Bab-el-Mandeb, Hormuz and more. Whoever controls the adjacent provinces controls the chokepoint. In a ten-year test game with real start data, the share of total flow value was for example 14.6 % for Gibraltar, 14.0 % for Dover and 7.2 % for Hormuz – a measurement from the prototype that shifts in every game with economy, wars and alliances.
War, rerouting, blockade
If one side of a trade is at war, the route may not cross provinces or chokepoints of the enemies. If there is a longer way, the flow is rerouted and becomes more expensive. If there is none, it is blocked: it dries up until another partner is found, and the game notes which chokepoint it is stuck at. Long or blocked routes make imports more expensive and depress export revenue – that ends up in the domestic price and from there in the “Why?” tooltip.
How the map draws it
Hundreds of flows as individual lines would be unreadable. The map renderer therefore bundles every section between two provinces into a trade vein; its width grows logarithmically with the value of the goods. The individual flows run inside it as lanes side by side, always in the same order, coloured by group of goods – energy amber, industry steel blue, agriculture olive. Glowing comets show the direction. Blocked flows are drawn interrupted, with a warning symbol at the chokepoint.
The mesh is built in a web worker so that the interface stays smooth. According to the specification, this reduced the time on the main thread from around 75 ms for 500 flows to under one millisecond.
The “Trade” map mode is in the game; the codex article “Trade & chokepoints” explains the background.
Comments with an account follow with the community area. Until then: discussion on Discord.