I disagree with your analogy, Factorio is a massive game with a lot of interactions, rewriting it probably would be "climb Mt Everest" hard (as much as a physical task can be compared to an intellectual task). Not only would much of the game logic basically have to be written from scratch, but then they need to go through testing and bugfixing all that, then redo multiplayer (again). When I say it can't happen in Factorio, I'm speaking of feasibility. Even if cost weren't an issue this update would take an absurd amount of time. Just the multiplayer update took, what, four months to develop and test? This would be delaying release by at least a year. The player base would go mental.BenSeidel wrote:It is as simple as I am making it out, at least in terms of the technique. You seem to be getting the effort required for a complete rewrite confused with the effort to learn and use the technique for new code. At no point have I ever said that all the code in factorio should be rewritten, far from it. They are running a business, they need to make money and for that they need to get the game finished. All I have said is that IF Factorio was to be rewritten to be truly multithreaded than it's not as hard as everyone thinks that it is. It's still hard, but not climb Mt Everest hard, more learning to read hard.
Remember Factorio doesn't use a standard main loop, though I don't know if we even can know how it would affect this suggestion from the limited information provided on it.BenSeidel wrote:The changes to the main loop are minimal.
And anyway we don't know exactly what the problem areas are. As has been said you could probably optimise 90% of the code a hundredfold and see zero performance increase because the remaining 10% is where all the processing is getting held up, and we don't know what that 10% is. It may very well be simple for them to multithread inserters or whatever but pointless as it would only end up waiting for other threads.
Maybe it can be done, maybe it can't, I don't know, but I would avoid coming out with statements like "Factorio can be multithreaded easily" because you don't know either. You have educated theories and ideas, but without seeing and understanding the Factorio code itself you can't say for certain. Regardless of your achievements I highly doubt you've written something so complex, intricate and still efficient enough to run 99% of factories smoothly on relatively low-end gear, which I mean only as credit to the Factorio developers.