what am i doing
Arcane
- Joined
- Dec 24, 2018
- Messages
- 1,899
That's on us for not making progress.I think i'm hogging up the thread a bit :-P.
EDIT: what little progress I'm making: reworking my editor so that instead of an ImGui window with buttons that open up more windows I have kind of an Adobe style layout and can pick the thing I want to be editing on the left, I get some data / options on the top if applicable, and more data on the right. This will take a while to shift around because it means using std::function to configure the UI and somewhat changes the way that the UI is described. But it will make it much easier to use eventually and will also make it easier to link active brush modes with the selection of an editing mode.
Now because I'm still kind of burning out on code I have been doing some world design stuff as well. Part of the trade simulation will require the presence of defined geographic regions in order to batch together very small trading units (such as one-tile-minor countries) and to subdivide very large trading units (such as late-game pan-national states or major trade blocs), for multithreading purposes. I tried just picking clusters of zones and this did not work out well. So instead I am going over the rough draft of cities I had and redoing them, with the cities roughly equally distributed (except that major rivers will have cities at their mouth instead of somewhere vaguely nearby, and where a city would be near the course of a major river it's at the river instead). I am then periodically generating a Voronoi diagram out of the cities to verify that the resulting areas will be roughly equal in size, overall. Once that is done I will do a rough sketch over the final diagram, and then trace along the closest zone borders to produce trade regions.
The idea here is that trade between populations and operations takes place per Zone first, but there's also an entity called a port (not necessarily an actual sea port, but generally linked to the major city in the area) which can purchase and sell resources. The port is accessible in that scope, but then in the next stage, the ports from various zones in a geographical region are able to trade with each other, plus one additional regional port (or possibly two, one to represent the major trade city in the region, and another to represent "diffuse trade"). Then the regional ports trade with each other plus one global port. Then the global ports trade with each other. To my mind this should provide a reasonably accurate simulation of the flow of goods in a global market while also allowing aggressive parallelization - but (eventually) we'll see how well it works in practice. In any case, that's why the trade regions need to be sorted out. I do want the simulation to be able to scale very greatly as average core counts increase, so rather than having a dedicated worker thread for each category of work (as Paradox does in their newer games, and which would at a certain point lead to idle cores) I prefer each category of work to be able to be sliced apart as much as possible and fed to a thread pool. So far as I can tell, we still haven't run into a "core limit" - AMD is putting out CPUs with 192 logical cores, and while those kinds of core counts won't be in average consumer hands for a very long time they do prove that there's no physical limitation against having a couple hundred logical cores (unlike clock speeds, which have basically hit their limit).
Last edited: