Live data from Hacker News

Seven Years of Factorio Friday Facts (2020)

spieswl.github.io

11–20 of 76 posts

Re: Seven Years of Factorio Friday Facts (2020)

#11
post #6

For those wondering why this game about factory management keeps showing up on the front page of HN, it’s because the gameplay reminds its fans of software engineering in subtle ways. People who are good at one are likely to be good at the other. More about this here - https://blog.nindalf.com/posts/factorio-and-software-enginee...

An interesting thing about Factorio to me (beyond what’s stated in the linked article), is that it contains a nearly a perfect 1:1 analogy to software concurrency.

• Belts are blocking CSP channels, as seen in e.g. Golang (where N producers have to share — or eventually “merge onto” — one channel representing the blocking-receive point of the consumer; which are best only used to transport messages of a single type, or if not, then the sum-typed channel must be demultiplexed at the end, with this tending to lower throughput; where messages of a given type “queue up” until the channel is full, and then all producers block when attempting to write to the channel; where if you’ve got producers producing at different rates, then the fastest ones can hog the capacity of the channel, decreasing throughput and unevenly spending input resources such that some components fail long before others; where the solution to this is to give each producer its own bounded outbox channel that multiplexes onto the consumer’s channel, such that the producer will block itself rather than blocking its siblings; etc.)

• Logistics robots are message-queue topics (where N producers can publish messages of a given type, without worrying about how they’ll get to a consumer; where consumers [demand chests] subscribe to specific event message types; where the bus itself can get overloaded, causing delivery failures of unrelated topics as delivery-threads sit around holding a message unable to deliver it; where the solution to this is to add reliable MQ-internal storage [network-linked storage chests] for the agents to offload produced messages to until demand comes for them.)

(Sadly there’s no exact equivalent to Erlang-style message-passing, where producers target messages of arbitrary type at a specific consumer, which all go to the consumer’s single inbox; and where, if that inbox is full, then the message just “evaporates” en route, since the passed message has async semantics where the producer isn’t linked to its delivery. But, interestingly, that type of concurrency totally could be added, with a not-even-very-complex mod — just add a “outbox” chest object that can be configured to “target” a specific “inbox” chest somewhere else; and a second type of logistics robot that only moves stuff from outbox chests to inbox chests, not according to “demand” but just because anything currently sitting in an outbox chest is “intended to be” in the corresponding targeted inbox chest; and then ensure that this alternate type of logistics robots have non-reliable delivery semantics, where if the “inbox” chest signals to the network that it’s full, then all active delivery-threads targeting that inbox will literally “drop their messages on the ground”.)

IMHO it’s actually possible to learn how to be an effective distributed-systems engineer, just by playing Factorio and trying to scale the throughput of a resource-constrained system. In the process, you’ll likely re-invent many real-world concurrent software design patterns. Doing this first, and then reading a Distributed Systems textbook, will have a much more visceral impact on you, because you’ll have already faced these problems, struggled with them, and now you’re being handed all the techniques for solving them on a silver platter.

Re: Seven Years of Factorio Friday Facts (2020)

#12
post #6

For those wondering why this game about factory management keeps showing up on the front page of HN, it’s because the gameplay reminds its fans of software engineering in subtle ways. People who are good at one are likely to be good at the other. More about this here - https://blog.nindalf.com/posts/factorio-and-software-enginee...

I've seen this said literally hundreds of times and can only imagine that these comments are hyperbole now.

I've given Factorio dozens of shots now, and have played for hours and hours with people who are great at the game, but it just isn't for me. I get bored in the monotony of the early game, and I'm too stupid to keep things going in the mid game.

Re: Seven Years of Factorio Friday Facts (2020)

#13

Quick links to the five "must read" posts that William highlighted: > FFF #243 - New GUI tileset: Showing off their GUI design document. A MUST READ, if only for a good example of a comprehensive design style that fits the game theme perfectly. ( https://factorio.com/blog/post/fff-243 ) > FFF #176 - Belts optimization for 0.15 : Incredible analysis of transport belts and optimizing their performance. A MUST READ. ( h…

356 is a really nice read. inspirational indeed.

Re: Seven Years of Factorio Friday Facts (2020)

#14
The Friday Facts were fantastic. I don't know of any other non-open-source project (but counterexamples are of course welcome) that encourages the developers to put that much technical information about what they're up to out on the website. I especially loved the ones about belt optimizations, multi-threading, and the networking model, since those are all interesting problems that any game developer is likely to think about but not necessarily get around to really solving the way that Factorio did. The FFF's inspired me to, on a total lark, send over my resume, which turned out to be good timing.

I think my "holy crap I'm working on factorio, pinch me" was equivalent to some people's "holy crap I'm working for Microsoft." I still remember the odd smell of the office when I first walked in ("sorry it smells like acid in here", I was told, and was later disappointed to learn that when Europeans say "smells like acid" they just mean it smells bad; there was no open use of entheogens while I was there).

I'm glad fff-200 made the cut for this guy's list, as that's the one where I announced the new 'programmable noise' terrain generator. More deets in https://www.factorio.com/blog/post/fff-207, https://www.factorio.com/blog/post/fff-258, and https://www.factorio.com/blog/post/fff-282, among others.

Re: Seven Years of Factorio Friday Facts (2020)

#15
post #12
post #6

For those wondering why this game about factory management keeps showing up on the front page of HN, it’s because the gameplay reminds its fans of software engineering in subtle ways. People who are good at one are likely to be good at the other. More about this here - https://blog.nindalf.com/posts/factorio-and-software-enginee...

I've seen this said literally hundreds of times and can only imagine that these comments are hyperbole now. I've given Factorio dozens of shots now, and have played for hours and hours with people who are great at the game, but it just isn't for me. I get bored in the monotony of the early game, and I'm too stupid to keep things going in the mid game.

I don't think there's a statement in there about enjoying the game, just the shared skillset and mindset. :)

Re: Seven Years of Factorio Friday Facts (2020)

#16
post #9

Earlier quoted context omitted.

Preamble: I mean this as a compliment to the game, so I hope I don't come off too negative. Factorio is so analogous to coding that I just couldn't get into it. I laid out a neat little factory and then requirements changed and I realized that I needed to basically abandon what I had and build something new. My factory was not really "open to refactoring". Something about that feeling felt so similar to what I have t…

This, for me, certainly drove home how much I hate refactoring things. If I need to reconfigure my factory for some reason, beyond throwing in a little spaghetti and in-filling some gaps to add another few bits of production, I'll just waltz off into the distance a ways and start anew, piping in resources from the old factory as needed. And then I run into bottlenecks arising from the utilization of the old factory a…

I find your comment super interesting. I myself deeply enjoy refactoring as an activity in software, and I share that affinity towards it both in Factorio and Minecraft, where I'll deeply enjoy tearing down massive chunks of my base to reconstruct them slightly or completely differently.

Re: Seven Years of Factorio Friday Facts (2020)

#17
post #11
post #6

For those wondering why this game about factory management keeps showing up on the front page of HN, it’s because the gameplay reminds its fans of software engineering in subtle ways. People who are good at one are likely to be good at the other. More about this here - https://blog.nindalf.com/posts/factorio-and-software-enginee...

An interesting thing about Factorio to me (beyond what’s stated in the linked article), is that it contains a nearly a perfect 1:1 analogy to software concurrency. • Belts are blocking CSP channels, as seen in e.g. Golang (where N producers have to share — or eventually “merge onto” — one channel representing the blocking-receive point of the consumer; which are best only used to transport messages of a single type,…

I wanted, but never got around to, creating a mod that accepts some kind of data outside the game (lines of text, JSON objects, packets from the TUN driver, whatever), wraps them up as Factorio objects, and plops them onto a belt, and another that reads them and sends them back out.

The idea being that this could be (A) a cool hack (belt speed factoring into ping time, lmao), but (B) a way to visualize data flow in complex queue systems.

Re: Seven Years of Factorio Friday Facts (2020)

#18
post #12

Earlier quoted context omitted.

I've seen this said literally hundreds of times and can only imagine that these comments are hyperbole now. I've given Factorio dozens of shots now, and have played for hours and hours with people who are great at the game, but it just isn't for me. I get bored in the monotony of the early game, and I'm too stupid to keep things going in the mid game.

I don't think there's a statement in there about enjoying the game, just the shared skillset and mindset. :)

Maybe that's why I don't enjoy it... Feels like I could be getting work done on any of my side projects when I play. Don't have that same feeling when I'm playing other games.

That being said, I do enjoy it at LAN parties because I just build walls and hunt biter nests

Re: Seven Years of Factorio Friday Facts (2020)

#19
post #14

The Friday Facts were fantastic. I don't know of any other non-open-source project (but counterexamples are of course welcome) that encourages the developers to put that much technical information about what they're up to out on the website. I especially loved the ones about belt optimizations, multi-threading, and the networking model, since those are all interesting problems that any game developer is likely to thi…

Thanks for writing (the code and the blogs!)

What are you up to these days?

Re: Seven Years of Factorio Friday Facts (2020)

#20

Quick links to the five "must read" posts that William highlighted: > FFF #243 - New GUI tileset: Showing off their GUI design document. A MUST READ, if only for a good example of a comprehensive design style that fits the game theme perfectly. ( https://factorio.com/blog/post/fff-243 ) > FFF #176 - Belts optimization for 0.15 : Incredible analysis of transport belts and optimizing their performance. A MUST READ. ( h…

> Earlier this week we got a bug report about the game freezing, consuming all of the available RAM, and then crashing when it ran out of RAM. It was again a modded save file so my first instinct was to blame it on a mod. Again, I had to test it. And again... it's never what you think it is.

> So, I still repeat the phrase: "Crashing on dereferencing null? Just add a null check!" as a reminder to myself and others to always look deeper into why and never stop at the basic symptom of a problem.

I feel this is a very important rule that people often forget - most anytime your "safety" code triggers, something went wrong somewhere else and it can be worth tracking it down.

Post reply on HN