Hacker News new | past | comments | ask | show | jobs | submit login

Even though it is many orders of magnitude simpler than the real-world equivalent, I find that there is no better way of grasping the logistics of modern civilization than playing Factorio.

In fact, it's probably in the Goldilocks zone: easy enough to play, but complicated enough to convey the kind of resource, energy and transport logistics involved in scaling a multi-step production process. It is like an illustrative toy model.

The aliens even give the game a satisfying environmental and political dimension, though the mechanics in this respect are more straightforward, i.e., just kill the aliens. Though emitting less pollution with solar also helps.




It's also in weird way analogue for development.

You can just go for it and make a production chain for a product, but if next one needs same intermediates you'd be re-doing it. i.e. doing a spaghetti code.

You can section off the each intermediate into separate factory and just chain them to eachother and have relatively nice order, but when you try to expand production of everything, there is no easy way to grow that complex, so the best you can do is just copy the same block around.

Lastly you can build a rail network and put each intermediate anywhere you want without much problems, but wiring everything up will take a lot more effort, you will have to go to various places to debug any problem, any problems are less visible at first glance and lastly if you don't plan for capacity you might have bandwidth and latency problems


I can't wait for the day we can ask a general-purpose gaming AI to optimize the production line for this game, learn from it, and then backport the theories to my codebase at work.

Humans... or at least me... are so bad at this sort of multivariate optimization. Even if you cheat and give yourself infinite resources and all the technologies and set out to plan the perfect economy from the get-go, eventually something you forgot will throw a wrench into some tiny part of the supply chain, and the whole thing comes crumbling down. Then you try to build some redundancies into the system, but the overlapping networks create routing problems of their own.

I wonder, in general, if games like these are "solvable" via some sort of theory, or if you just have to iterate through a billion configurations before you arrive at a better one...


I don't know what your definition of solvable is for Factorio, but for mine, there are already a few calculators out there that can solve the infinite resource/constant thruput scenario just using linear algebra. The base game has a limited number of products. Maybe in some of the overhauls like K2SE or Py's, you might need something more complex since those are 10x-100x the base game, and the system of equations may surpass numerical methods on a single computer.

The real serious solutions are actually you versus your system resources. There solutions look awfully like low level performance tricks like inserter clocking (think SIMD) or belt compression (think fitting data in cache lines/reducing pages). Both of these things would take not just and understanding of the game, but understanding how the game is programmed.


I've work on an algorithm that analyses a blueprint and finds the bottleneck : [factorio_blueprint_analyser](https://github.com/Tomansion/factorio_blueprint_analyser)

It doesn't make suggestion, but knowing where something is wrong is a start.


Constraint solvers have already been used to generate optimal belt balancers (and it's beautiful / incredible). The designs they come up with for 16-wide balancers are, I think, beyond anything a human could have realistically created in a single lifetime.


I have no idea what any of these words mean, lol... can you link to a post/video showing this? That sounds awesome :)


This [Factorio SAT Solver](https://github.com/R-O-C-K-E-T/Factorio-SAT) has generated novel balancer designs. See the [wiki](https://wiki.factorio.com/Balancer_mechanics) to learn about belt balancers.


Oooh boy, rabbit hole time! This is beautiful, thanks for sharing :)


I wholeheartedly agree with this. The way I go about developing my base in Factorio reflects how I go about developing software. What's interesting is that in playing Factorio, the weaknesses in my approach are more readily apparent (because they are visual?) and consequently, I am learning to be a better developer from playing Factorio. This is coming from a hobby developer so ymmv, but this is how I justify sinking so many hours into playing this game.


The instant feedback of Factorio is also nice. Its much more like a Dataflow language or Excel where code (factory) and data (products) coexist


I was really surprised at how similar it felt to doing real work (as a SWE). I actually stopped playing for that exact reason - it just felt like work to me. I can totally see how it’s fun, but I don’t need to be thinking about long-term architecture / design for that many hours of my life.


It was fun for me to finish the game for the first time, but then I thought to play again to make everything better and plan each move from the very beginning. Aaaand I stopped after 1 or 2 hours because it wasn't fun anymore. And never got back to the game.


That's why I stopped playing, and probably why it wasn't quite as much of a revelation for me to play it. I saw the throughput and dependency pitfalls and (roughly) planned for them early, where I imagine someone new to those kinds of problems would run into those issues head first, and be able to use factorio to learn about them first hand.


However Factorio lacks refactoring tools, tests and source control. If your code feels very similar to your bases maybe you're not using these things enough...


You can do red/green testing via circuits maybe.

I haven't tried doing that in particular, but you can set up a logistic rule (e.g. business requirement) and show red until it passes.

E.g. Measure Ore being produced and shoe red if it isn't a certain amount per time period.


> It's also in weird way analogue for development.

And base designs on a map can even end up looking very similar to CPU designs.


> The aliens even give the game a satisfying environmental and political dimension, though the mechanics in this respect are more straightforward, i.e., just kill the aliens. Though emitting less pollution with solar also helps.

I wish for a factorio clone that explores this more, rather than just an environmental hazard employ/enslave the local population, feed them, and so on.


I couldn't agree more, I think the production logistics are so good in Factorio that they're really running up against powerful diminishing returns. Better to strengthen a fascinating, secondary part of the game with a lot of space left to explore: the aliens.

Hopefully this is part of the Factorio expansion.


They’re not aliens, they’re natives. You’re the alien. This is not just a semantic difference as it carries some thoughtful ramifications.


Let me become an alien overlord, dang it


Captain of Industry is not quite this, but uses population mechanics a lot - with your first factories supplied by truckers driving back and forth rather than conveyor belt. Keeping the population fed and not overworked becomes a major hurdle.


I couldn't get into captain of industry. The gameplay was too complex and slow from the start.


Every hive you kill causes the aliens to evolve a little bit more. You’ve also got to balance your expansion and innovation against their evolution.


I think I just set up a perimeter with maintained lasers. Then the aliens would get up to maybe 10 or so beasts and rush the perimeter the lasers would cut them all down. lather, rinse, repeat. Seemed to be steady state.


I always give up on Factorio playthroughs when I have to start shuttling different kind of research around on conveyor belts. Up until then it's exciting/exhausting.


Huh. That's one of the parts I enjoy most! There's so many ways to approach it.

One I haven't seen documented widely:

Use a slow belt holding two science types (one each side) to feed the left side of a faster belt (which then has a left lane that alternates between the two colors). Repeat for the right side (your fast belt now has four colors). You now have a four-color belt to feed your labs, but it backs up when you use more of one color than another, so at the end you add splitters to extract the individual colors into four belts, and feed them back into the start (with priority, so they don't block).


Inserters can be used to place or remove research from the research facilities. For me that meant setting up the research facilities in rows, then having inserters pull some types from the top side downward, and other types from the bottom side upwards. Along with the large inserters there was more than enough space to build things with only a few belts feeding things.


That's likely where you start running into resource distribution and dependency issues, you might be subconsciously feeling the weight of the upcoming feature requirements!

For me the research was the only reason to keep playing as it gave purpose to the factory, otherwise it was just a factory for it's own sake. Same way a vehicle building game is a bit pointless without something to do with the vehicles, which Stormworks does a good job of solving by giving you rescue missions of different types to perform with your creations.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: