Live data from Hacker News

Factorio – Statistics improvements, Linux adventures

factorio.com

21–30 of 57 posts

Re: Factorio – Statistics improvements, Linux adventures

#21
post #16

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).

Is that relevant if the forked process only has to save the game-state to disk and then die? I'd think reading the game-state wouldn't require some mutex lock.

Re: Factorio – Statistics improvements, Linux adventures

#22
post #16

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).

The good thing about this usecase is that they do not need to solve the general problem of forking a multithreades program.

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

#23
post #17
post #15

Earlier 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.

They’re dropping a hard dependency on X11 and instead using a library that interfaces with X11 or Wayland for it.

It still runs fine on X11.

Re: Factorio – Statistics improvements, Linux adventures

#24

If they drop X11 support that will finally be the end of my cracktorio addiction.

I don't think they are planning to do this; they are at least maintaining support for whatever MacOS (Metal?) and the Nintendo Switch use in addition to Wayland, which suggests to me they are dropping X11 as a hard dependency not as a usable backend.

Re: Factorio – Statistics improvements, Linux adventures

#25
post #17
post #15

Earlier 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.

There is a comment in the forum discussion by the author of the Linux section that X11 support is not going away, simply because SDL supports it.

https://forums.factorio.com/viewtopic.php?p=609071#p609071

Re: Factorio – Statistics improvements, Linux adventures

#26
post #2

When 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?

Yes. I believe they also vendor SDL, because they've mentioned in the past making local changes to SDL for their needs. There's also a comment in the Reddit discussion by the author of the Linux about deleting a large number of lines of code when he removed their vendored FreeType, so it's likely the case for Allegro too.

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…

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 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…

Ok, so make it optional to use custom window chrome/decorations, rather than make it mandatory.

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

#29
Is 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)

Re: Factorio – Statistics improvements, Linux adventures

#30
post #29

Is 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 )

Many of the changes affect the base game as well. Accumulator charge graphs were very overdue.
Post reply on HN