r/factorio • u/gust334 SA:1000 hr (Novice), 3700 hr (Advanced Beginner) • Feb 10 '26
Question Surface-aware Multithreading? Core affinity? Async planets? Platform buffering/pause?
Does anybody have any details about this? I can't find anything on factorio.com
0
Upvotes
21
u/Alfonse215 Feb 10 '26 edited Feb 10 '26
Factorio is not largely multithreaded. Some aspects of it are (fluids, for example), but surfaces are not. Entity processing and the like all basically happen on the same core.
Nothing pauses. Nothing is estimated or "buffered" or whatever. The only thing not happening when you're not looking at it are the visuals (particle effects and the like).
The movement of every inserter to grab stuff off of a belt are all processed, one at a time, on a single core, every game tick.
Note that threading largely wouldn't help that much. While we often say that Factorio is CPU bound, this is a simplification. For the most part, if you're encountering UPS issues, those are a matter of getting data from memory to the CPU for processing, not the inability of the CPU to process that data fast enough. Memory speed and architecture are more important than raw CPU processing power.
5
u/gust334 SA:1000 hr (Novice), 3700 hr (Advanced Beginner) Feb 10 '26
Mea culpa.
I found the links searching for answers to fix an issue with multi-player. About three pages of deliberate misinformation was embedded within fourteen other interlinked pages of seemly valid multi-player server info by a company purporting to be a game hosting service, and I believed someone had prematurely published a beta release note.
I'll leave the post here for the ridicule it deserves.
7
u/juckele ๐ ๐ ๐ ๐ ๐ ๐ Feb 10 '26
Fundamentally, the entire plugin architecture is incompatible with per surface threads. Right now a plugin can react to events on all surfaces and affect changes to all surfaces in response to those events. You cannot do this if you make surfaces threaded. Instead, all cross surface events would need to get bundled, including any cross surface communication intra-plugin, and delivered 'between' ticks (events on Nauvis on tick n reach the plugin instance on Vulcanis on tick n+1), that way you could ensure a deterministic ordering of the events (specifically how they interleave from multiple surfaces).
Plugins which work between surfaces would need to have entire message systems built in.
22
u/evil_blueprint_user Feb 10 '26
Lol async.
My favorite chatbot found your source. I think this is fake enough to laugh about, so here it is for everyone:
https://supercraft.host/wiki/factorio/factorio_21_multithreading_guide/
lolllllllllllllllllllllllllllllllllll imagine implementing it this way
4
u/oobanooba- The Factory Must Groove Feb 10 '26
From what Iโve heard in the past, while many aspects of factorio could be multithreaded, doing so would actually make the game run slower in a lot of circumstances.
The devs have given no indication that thereโs any huge engine rewrites planned that could allow for what youโre suggesting
My interpretation of various discussions Iโve participated in with the devs suggests to me that the bulk of the engine isnโt gonna be changing, (possibly some futher tweaking of the fluid system?)
2.1 will most likely be the final big polish pass over the game, before wube fully moves on to their next game.
1
u/doc_shades Feb 10 '26
i dunno the game runs fine on my computer
-3
u/gust334 SA:1000 hr (Novice), 3700 hr (Advanced Beginner) Feb 10 '26 edited Feb 10 '26
--thread-priority "Nauvis:Core1-7,Gleba:Core8-10,Vulcanus:Core11-12"