Using fork to save the game state in the background is really clever. love it.
I wonder how they deal with multi-threading. Forking a multi-threaded process is very error-prone (e.g. allocator locks can remain orphaned).
Factorio – Statistics improvements, Linux adventures
21–30 of 57 posts
Re: Factorio – Statistics improvements, Linux adventures
#22Using fork to save the game state in the background is really clever. love it.
I wonder how they deal with multi-threading. Forking a multi-threaded process is very error-prone (e.g. allocator locks can remain orphaned).
The child process is doing a very specific job that amounts to serializing the contents of memory and writing it to a file. Once that is done is can simply exit, and all the orphans are cleaned up.
While this is admittadly more complicated, it is the same general idea behind fork+exec. Sure, your serialization logic cannot call malloc, but how often do you really need dynamic memory allocation. And if you really do need to, you can use a simple mmap backed bump allocator (or any other custom allocator you want)
For datastructure locks protecting gamestate; just wait until the gamestate is in a consistent state before forking.
Of course, if you try reusing existing code, or forget about the limitations while writing new code; it would be easy to introduce non-deterministic bugs.
Re: Factorio – Statistics improvements, Linux adventures
#23Earlier quoted context omitted.
I don't see anything to indicate that they're dropping X11 support? It sounds like they're dropping dependencies that would require X11 to be installed.
No, it doesn’t sound like they’ll be dropping X11 support any time soon. At least, not before the 2.0 release. It is nevertheless one of those worrisome things.
It still runs fine on X11.
Re: Factorio – Statistics improvements, Linux adventures
#24If they drop X11 support that will finally be the end of my cracktorio addiction.
Re: Factorio – Statistics improvements, Linux adventures
#25Earlier quoted context omitted.
I don't see anything to indicate that they're dropping X11 support? It sounds like they're dropping dependencies that would require X11 to be installed.
No, it doesn’t sound like they’ll be dropping X11 support any time soon. At least, not before the 2.0 release. It is nevertheless one of those worrisome things.
Re: Factorio – Statistics improvements, Linux adventures
#26When they say they removing their Allegro dependency "eliminated 123,024 lines of code from the game" I assume this is because they'd vendored in the code?
https://old.reddit.com/r/factorio/comments/1cdifrh/friday_fa...
Re: Factorio – Statistics improvements, Linux adventures
#27> Most desktop environments will allow windows to supply their own decorations if they wish but will provide a default implementation on the server side as an alternative. GNOME, in their infinite wisdom, have decided that all clients must provide their own decorations, and if a client does not, they will simply be missing I'm sure there was/is a good reason why this design decision was made, but it certainly seems a…
https://gitlab.gnome.org/GNOME/mutter/-/issues/217
https://gitlab.gnome.org/GNOME/mutter/-/issues/1143
... and probably many other places.
Re: Factorio – Statistics improvements, Linux adventures
#28> Most desktop environments will allow windows to supply their own decorations if they wish but will provide a default implementation on the server side as an alternative. GNOME, in their infinite wisdom, have decided that all clients must provide their own decorations, and if a client does not, they will simply be missing I'm sure there was/is a good reason why this design decision was made, but it certainly seems a…
Their reason was that applications want to control everything about how they look, so they don't want compositor-provided decorations that clash with the rest of the application window. Whether that's a *good* reason... Well lots of electrons have been used up in that discussion already. https://gitlab.gnome.org/GNOME/mutter/-/issues/217 https://gitlab.gnome.org/GNOME/mutter/-/issues/1143 ... and probably many other…
GNOME devs are very arrogant. “Do it our way or go away.”
They make it very hard to hold onto any hope that there will ever be a reasonable, cohesive, Linux desktop experience.
Re: Factorio – Statistics improvements, Linux adventures
#29Edit: expansion I guess, since the last 3 releases don't mention statistics (https://forums.factorio.com/viewforum.php?f=3)
Re: Factorio – Statistics improvements, Linux adventures
#30Is this about the upcoming expansion or the base game? I am not reading FFF to avoid spoilers and instead get the full wow effect the first time I play the 2.0 Edit: expansion I guess, since the last 3 releases don't mention statistics ( https://forums.factorio.com/viewforum.php?f=3 )