3 ms·
Multithread w h e n ??? Also, early embark setup fatigue is real. Setup the stockpiles. Plan the rooms. Have the plans outpace your current productivity and ha
by shrimp_emoji 8y ago
Multithread w h e n ???
Also, early embark setup fatigue is real. Setup the stockpiles. Plan the rooms. Have the plans outpace your current productivity and have it take way too long. Do this every time.
Once that's over, though, you get to enjoy sorting through droves of migrants, assigning each to the tasks they're most appropriate to or which need the most dwarves right now (the game actually approximates this automatically in that it generates migrants vaguely in reflection to the fortress's needs, but it's not like it assigns all burly, tough, slow-to-tire dwarves to your melee squads or that talented bonecrafter to more useful crafting jobs, so it's up to your manic OCD). Do this every season.
Somewhere in there, have some !FUN!.
- Fjolsvith 8y agoI prefer to embark next to volcanos and have the dwarves tap the volcano to make defenses (think magma traps and moats) and power furnaces and forges. Once, my dwarves built a box structure on top of their underground fortress entrance. Built a wall around that, and filled the in-between space with magma to create a sheath defense. The ingenuity of dwarves is marvelous!
- jandrese 8y agoMultithread never. You know in your heart of hearts that DF wasn't built with modularity in mind and that the code is a horrific mess of dependencies everywhere and making it multithreaded would require a near complete rewrite of the system.
- a1369209993 8y agoActually, one of DF's biggest CPU-sinks is AI pathfinding, which is a: embarrassingly parallel and b: highly speculatable[0], so the only hard part would be keeping map walkablity data in-sync or read-lockable (depending on whether you want a separate copy or not). 0: ie, you can fire off a pathfind from your current position, keep walking for several steps (many game ticks) before getting the result back, and just do some minor fixups to make it work.
- mikekchar 8y ago> the only hard part would be keeping map walkablity data in-sync or read-lockable I suspect that this is entirely the problem. For quite a while not I've gotten the impression that all of the game state in in a single data structure. Also I'm pretty sure that there are update anomalies galore even now. It's almost certain to be a herculean task. I might be wrong, but the fact that Tarn has never even attempted it makes me suspect that I'm right ;-)
- baroffoos 8y agoShould rewrite it in rust
- adsigonionio 8y agoGiven what we can see on the surface, DF is probably a mess under the hood. I'd bet a competent C programmer could speed it up a LOT with old-fashioned single-threaded optimizations.
- chapium 8y agoBy the time you synchronized all that state would there be a performance payoff? My gut tells me the overhead would eat up a lot of the benefits.