News for hackers. Stuff that matters.
Re:The Factorio Mindset by minihat on Friday February 11, 2022 @11:54AM (#30303680)
My friend has 600+ hours played of Factorio.

He just beat the game for the first time. I bought it, we played multiplayer. And I taught him the mantra "great is the enemy of good enough". Our run took 14 hours.

I also know many people like this at work, and wish they could have the Factorio experience.

If you refactor at the first sign of trouble, you remain blind to totally new to problems just around the corner.

Re:The Factorio Mindset by chrisfosterelli on Friday February 11, 2022 @02:45PM (#30306136)
I mean, some people just prefer to play the game more leisurely. It's not a speed run or a business deliverable. I have around 80 hours on my factory so far and it's pretty clear to me I could have "finished" by now with a lot more corner cutting but I'm enjoying the process of exploring each tech tree discovery in depth and scaling things out "right". This takes longer, but it's fun and I feel better about the end result, and isn't that the point?

Also -- playing the game over again gives a colossal speed benefit. Probably half of my time spent on this game has been ripping up everything I did that I realize clearly won't work nicely once I reach the next tech tree item. Knowing what the end game looks like in advance saves a lot of time.

I think I partly like this game because it reminds me of programming before programming was work. Trying to get through everything as fast as possible sounds like the antithesis of that, but maybe that's just me.

Re:The Factorio Mindset by leafmeal on Friday February 11, 2022 @06:51PM (#30308451)
This sounds like how I prefer to code: slow, exploring, learning, etc. Hopefully that fits someone's business requirements.
Re:The Factorio Mindset by m463 on Friday February 11, 2022 @03:31PM (#30306652)
I got to the point where I could copy-paste walls with lasers around an area and then develop inside it at my leisure. Then the game was no-worries building therapy.
Re:The Factorio Mindset by DerArzt on Friday February 11, 2022 @04:32PM (#30307245)
No worries until the next bitter wave comes, and oh my god there are 20 behemoths and holly crap this drawing a lot of power, wait why am I experiencing a brown out? Oh no.....my coal mines are electric powered on the same grid as the turrets and the buffer is low......They made it through the wall.....They are destroying the base including the coal mines......Time to start over!
Re:The Factorio Mindset by fennecfoxen on Friday February 11, 2022 @05:33PM (#30307809)
This is why you have a separate defense grid, and a capacitor farm to serve defense demand, and when the capacitors run low you have a logic network to read the value of `A` (accumulator fill %) and turn off everything that isn't critical (mining, etc). (Of course, you'll need this switch at any satellite installation too.)

You may need to shift-click some electric poles to disconnect them from other poles, and use copper wire to connect them exactly how you want.

Add a lowkey alarm buzzer (the speaker) to let you know this is going on. Try to have a second, louder one that detects whether it's failed and the factory is still on because of a short circuit. Conduct tests by wiring in a constant combinator outputting a fixed value of A (possibly negative).

Re:The Factorio Mindset by sudosysgen on Friday February 11, 2022 @05:14PM (#30307653)
Always good to keep a few coal powered inserters, hehe
Re:The Factorio Mindset by fellellor on Sunday February 13, 2022 @06:13AM (#30320930)
I would have failed college if this had come out back when I was a student.
Re:The Factorio Mindset by fennecfoxen on Friday February 11, 2022 @01:35PM (#30305261)
> great is the enemy of good enough

One-man Factorio is a lot different than big-team Factorio. As a single factory-developer, you need to be startup-like and remember that your time in the present is the most valuable resource.

So always automate everything the first time, because you WILL need more of that component. But do it in a quick and dirty and unscalable manner so you can move on to something else. Start with box-fed production lines; when you're sick and tired of refilling the boxes, it's time to re-do it better.

Build a system to support this throwaway development, where you can tear things down later and replace them and it keeps working. Start with a narrow bus, not eight lanes each for iron and copper — but keep it open for expansion downstream. When you run out of space near the start of the bus, don't just move things a few tiles to squeeze in an incremental upgrade: build a much bigger production line further downstream. You'll have more and better components to do it right.

And always, always, always, keep your interconnects separate from your production components. You don't need a single straight-line bus like some people think, right angles and parallels and grids are fine, but if your belts are snaking through something else, it's real hard to tear down that something-else, and it's real hard to scale up. Encapsulation is important.

And when you're finally scaling up like crazy, ready for the big leagues, use a high-throughput component someone else developed and have your robots install it.

Re:The Factorio Mindset by skipants on Friday February 11, 2022 @11:57AM (#30303720)
That's been my takeaway from these games, too. It really helped with my perfectionism because it makes the negative effects of it tangible; you notice how much more time you lose by trying to be perfect rather than just getting your supply of materials up and running.
Re:The Factorio Mindset by cwkoss on Friday February 11, 2022 @12:17PM (#30304003)
The factorio dev team are such fantastic software engineers, I wonder if this was an emergent feature of building what they want or if there was actually intentionality in making this a common takeaway from playing the game.

If you haven't, read their blog! It's a master class in release notes and development communication.

Re:The Factorio Mindset by tstrimple on Friday February 11, 2022 @12:36PM (#30304316)
For me "beating" those type of games isn't the point. I've got nearly 1,500 hours on Rimworld and I've never beaten the game. It's more interesting to me to create different scenarios and see where they go and what stories come from them than to try to optimize for racing to the end.
Re:The Factorio Mindset by hobomatic on Friday February 11, 2022 @02:58PM (#30306271)
Yeah an earlier poster mentioned something about there being no black box problems and that all the information to do anything is already out there to read. I think this is only true if you are looking to beat the game in a prescribed way. There is a massive amount of space for experimentation and defining your own resource restrictions and goal state.
Re:The Factorio Mindset by godshatter on Friday February 11, 2022 @06:24PM (#30308223)
A good example of this in Satisfactory (haven't played Factorio) is balancers vs. manifolds. The idea is that you have factory components that need to feed other factory components at a certain speed to get to 100% efficiency. One way to do that is to place the correct number of splitters and mergers to get the right ratios based on the output rate of the various components and the input rate of the others (the balancer way). The other way (the manifold way) is to just hook up one factory component that needs to feed another and let it run until it has filled up it's buffer. Then add a splitter to take the overflow and repeat until you are at 100%. Do this for all inputs. A complicated balancer looks like a drawing of a Christmas tree made of balancers and mergers and takes up a lot of space. A manifold is just a line of constructors or whatever with splitters in front of them going from one output to one input.

You can put up a manifold without doing any math and just stop adding factory components when it can't feed the next building. You can sink hours into just designing the perfect balancer for your situation, let alone building it. I always go the manifold way.

Re:The Factorio Mindset by shane_b on Friday February 11, 2022 @11:58AM (#30303731)
In software dev, my team has a “naive, naive, refactor” rule for this problem
Re:The Factorio Mindset by rustyminnow on Friday February 11, 2022 @01:24PM (#30305096)
Could you elaborate on this rule?
Re:The Factorio Mindset by gknoy on Friday February 11, 2022 @02:19PM (#30305830)
My guess is, it has to do with how you handle 1, 2, N. The first time we write something, we write it just for that specific case --- no point overengineering if you don't know you'll need it. (Hence the "YAGNI" advice that is common.)

Now, there are two things that code has to handle. You could put in a simple bit of special-case logic, or a case statement, and move on, OR you could instead spend time, codes, and tests making it robust to handle many different types of input, with a type-specific config system that makes it easy to add new type-specific behavior.

Our predilection on many teams is to skip the middle part, and write robust automation the first time we hit a special exception. ("This used to be about ordering burgers but now we want to also order shakes, and they don't have a cook-time.") It seems like the OP was suggesting that we do a "crappy" good-enough solution to that intermediate phase of complexity, as there's a chance you might not need more than that.

Re:The Factorio Mindset by shane_b on Friday February 11, 2022 @04:00PM (#30306930)
Exactly, great explanation
Re:The Factorio Mindset by mceachen on Friday February 11, 2022 @02:29PM (#30305956)
It may be a reference to https://en.wikipedia.org/wiki/Rule_of_three_(computer_progra...

The idea is that you grit your teeth and let code be deduplicated twice (but no more), rather than immediately DRYing up code, so you'll (hopefully) have a better sense of what the common code should look like.

(I personally think it's too hard in practice, as common code can be written sufficiently differently to not be recognizable as common by the Engineers Of Tomorrow).

Re:The Factorio Mindset by shane_b on Friday February 11, 2022 @03:54PM (#30306871)
The first time you implement, the default is to over abstract. The second time even more. By the third, you have a good enough idea of what you need to then build something robust. Each phase is faster.

Second iteration is almost always copy and paste of first with small tweaks. I’d rather that than some kind of conditional.

The best UI almost never fits the most convenient technical solution so we optimize for UI and then technical.

Re:The Factorio Mindset by shane_b on Wednesday February 23, 2022 @09:50AM (#30441589)
Re:The Factorio Mindset by FeistyOtter on Friday February 11, 2022 @12:25PM (#30304141)
In what situations did this mantra help? I am the same as your friend, I have like 100 hours and I have never reached the endgame, always unsatisfied with my factory.
Re:The Factorio Mindset by dragontamer on Friday February 11, 2022 @12:55PM (#30304646)
Construction Bots can automatically "tear down" your trash areas, and unlocks the "copy" and "paste" buttons, meaning you rebuild the areas much faster.

Bots are roughly blue-science, or the ~halfway point of the tech tree.

---------

So everything "Before" construction bots can be basically seen as a "prototype" or "throwaway" factory. Everything "after" construction bots is also a prototype, because you can just hit the "deconstruct planner" and tear everything down automatically and reconstruct from scratch whenever you want.

If everything is a prototype, then perfection doesn't matter. Instead, you're "pursuing" perfection, teardown whenever you think you have a better grand plan, and copy/paste the design back if you make a mistake (or Ctrl-z / undo your decisions as needed. Etc. etc.)

Re:The Factorio Mindset by leetcrew on Friday February 11, 2022 @12:51PM (#30304578)
as you unlock more technologies, it becomes increasingly easy to refactor/maintain a large factory. ex: bots are a major inflection point in the game. you could scale up petroleum processing and red circuits before getting bots (you need these two things to make them), but that involves a lot of manual effort. it's usually better to do a barely sufficient (but tileable!) petroleum and rc setup, then immediately fix it after making a few construction bots.

more general tip: clean interfaces are more important than massive capacity up front. in the long run, you will always need more steel/circuits/etc than you can serve with a single production line. but even if the internal layout is a mess, a functional unit with a clean interface can be scaled horizontally forever.

Re:The Factorio Mindset by dragontamer on Friday February 11, 2022 @12:57PM (#30304697)
Cleanliness doesn't really matter, because space is infinite.

-----------

So long as you've unlocked enough military (ie: shotgun in the early game, or tank in the mid-game), you can just clear out more room and then build there. (Shotgun has significant pierce-damage, enough to kill the alien bases. Tank also has significant pierce damage and impact-damage, allowing you to win against small / medium aliens through the midgame rather easily and cheaply)

Don't even "tear down" your oldbase. Just fully abandon it and move elsewhere. Even without bots, there's no penalty to "just leaving".

---------

Bots / deconstruction planner is more of a thing if you're tired of cleaning out biter-territory and want to "recycle" your old areas.

Re:The Factorio Mindset by storyinmemo on Friday February 11, 2022 @01:13PM (#30304931)
Hi, it's me your local site reliability engineer. I care about things like latency, monitoring, and being able to understand the overall moving pieces. Scaling things in appropriate ratios is also relevant to me. I'd put you in a storage box and nuke if I could, but let's go have this conversation standing on these train tracks.
Re:The Factorio Mindset by dragontamer on Friday February 11, 2022 @01:48PM (#30305446)
> I care about things like latency

Good luck bootstrapping your first Kovarex U235 units!

A properly done Kovarex U235 takes about 2-hours to bootstrap itself. By this point in the game, you need to be able to "predict" how the factory will work in 2+ hours of latency and make sure things work as expected. (Or I guess you can blueprint copy/paste from an internet forum... but I find that "my own designs" are what make Factorio fun)

------

Once you're able to "predict" how the factory works in 2, 3, 4 hour scales, a lot of good designs open up. You focus on throughput and *eventual* designs... willing to wait 3 hours to get things done.

And by "wait", I mean go play somewhere else for those 2 hours. There's always more work to do, a design that takes 3 hours to complete _AUTOMATICALLY_, but only 5 minutes of manual / human input is superior to a design that takes 10-minutes of human effort but completes in 15 minutes.

The #1 resource in Factorio is player-attention. You should be laying out designs, and then _LEAVING_ in most situations. You let the bots complete the area and come back to "verify" when they're done.

Re:The Factorio Mindset by leetcrew on Friday February 11, 2022 @02:14PM (#30305747)
maybe we are talking past each other, but I'd say clean interfaces and bots are very important even if you don't want to tear down the original factory. you want to be able to double production of high volume products with a couple copy-pastes. can't really do this if you have some gnarly IO setup.

I agree clean layouts inside of functional units is unnecessary. land is cheap; just make something that works and cp it everywhere.

Re:The Factorio Mindset by dragontamer on Friday February 11, 2022 @02:35PM (#30306014)
> you want to be able to double production of high volume products with a couple copy-pastes.

In my experience, no.

Any high-volume production needs to be built from the ground up from smelters (or even miners) on downwards.

If you have 1-belts of iron feeding your factory and then want to expand, the easiest way to do so is to build a parallel +1 belt of iron (including the 70+ smelters and 50+ miners somewhere else) somewhere.

The terrain and issues of that other area (ie: water, cliffs, trees, etc. etc.) will be different. You can only legitimately "copy/paste" designs if you have an advanced set of terrain modifiers: landfill to erase water, cliff-explosives to erase cliffs, and flamethrowers to erase trees. (Chopping by hand takes too long. Even bots take too long in many situations to erase trees, especially at low-bot speed levels).

-----------------

If you try to "logically" add it to your factory (originally designed for only 1-belt), you end up with non-obvious starvation points everywhere.

Its far easier to declare the entire "logical belt" region to be a cohesive design (from mines to smelter to assembly machines to science to labs: beginning to end of the entire process).

There's an additional bonus to this: belting the "end-product sciences" is very easy and low-throughput. Instead of "moving your factory" around, it makes far more sense to "move your science belts" around.

-------

Its very hard to turn a "1-belt of iron + 1-belt of copper" factory into a "2-belt of iron + 2-belt of copper". Very very difficult, you really shouldn't be trying to find space for the extra belt or smelters.

Just "soft abandon" the base, and build your 2nd belt of iron + 2nd belt of copper elsewhere. Then build 2-belts of your red+green+blue+purple science (or whatever outputs your old base were doing) to lead to the new science center. "Abandon" the old science center as well (since the "old science" center won't have the extra science to advance forward).

"Abandoning" the science center means that all that space opens up for you to move your science-belts to the necessary location towards the new science center. Maybe you need to plow through some old areas but it'd be easier to do this from an "abandonment" mindset rather than a "cleanup" mindset.

---------

The only way you "cleanly" have room for that 2nd line of copper or iron, is if you magically remembered to leave room for the 70-smelters before you built the base. This is unreasonable.

EDIT: I guess you use yellow/red belts in the early game. 24-smelters per yellow belt of production. 48-smelters per red belt of production. 72-smelters per blue belt of production.

How do you grow 24-furnaces into 48? Doubling the size if you upgrade from yellow to red? (Or upgrading from 1x yellow to 2x yellow?). Its non-trivial to run that many lines through the middle of already-built factory areas.

And unless you planned for it, 24-additional furnaces is a non-trivial amount of space.

Re:The Factorio Mindset by leetcrew on Friday February 11, 2022 @03:26PM (#30306598)
before I have bots, I usually put down a minimal production line that doesn't saturation a belt. I place them perpendicular to the main bus, so they can be 2x'd or 4x'd before saturating an output belt or fully consuming an input. in the early stages of having bots, I scale them a couple times as needed.

but once I have a good number of bots and a couple speed upgrades for them, I try to switch to remote train-served factories for bulk items. so doubling steel really is as simple as copypasting the original smelters and train stops. with current train mechanics, you don't even have to rename the stops. from here you can either fully transition to block architecture (probably overkill for vanilla) or widen your original bus at the end by injecting materials via train.

if you do it right, the only manual effort for scaling is adding new trains to prevent starvation.

Re:The Factorio Mindset by dragontamer on Friday February 11, 2022 @04:13PM (#30307065)
It sounds like you're inadvertently benefiting from an advanced concept called "compression".

A yellow iron-belt can send at most, 15-iron per second, towards the factory. The player can spend this on 3-steel per second, 15-green circuits per second, 7.5 gears per second, or any such combination of intermediate materials.

However, "steel" has an interesting property, every "1 steel" you send down the factory is equivalent to sending 5-iron down to the factory.

---------------

This means that your singular steel belt sending only a partial belt (maybe 6-steel/second, which is only 40% capacity) is "equivalent" to sending 2-iron belts (30-iron per second).

"Compression" means that you only have to think about running 40% belt of steel, rather than 2x 100% belts of iron. This takes up 1/2 the space and is far simpler in the overall picture, and even leaves room on the belt for up to 2.5x expansion later. (Your 40% yellow belt can "expand" to 100% capacity in the long-game, ultimately reaching the same throughput as 5x yellow belts of iron at 100% capacity).

Playing with "compression" can lead to simplified designs. Similarly, green-circuits are great at compression (1-iron + 1.5 copper per circuit), as are gears (1-gear == 2-iron). But steel is among the best (5-iron per steel).

--------

If you work at the "steel" level and plan around a "future steel belt", you end up benefiting from compression and leading yourself towards simpler designs.

But that's an advanced concept. This isn't something I'd expect a beginner or intermediate Factorio player to get. The beginner/intermediate player would try to brute force the additional iron-lines using iron plates directly, and have a difficult job of doing so. It takes multiple playthroughs before you realize that belting-steel has benefits over belting-iron from a factory throughput perspective.

-----------

The recommendation I put above, to belt your science to new locations, is the ultimate answer to this compression. A blue-science pack consists of 1.5x adv. circuit + 1x engine + .5x sulfur

That is to say: one blue-science pack is 7.5 copper + 12 iron + 3 plastic + 1/2 sulfur, or roughly 23-resources per blue-science pack. That's a compression ratio of 23-to-1, superior to steel.

This makes "belting" blue science around a relatively efficient endeavor from a human-labor perspective. (True: the factory has to work 23x harder to "fill the belt", but if we're talking about "eventual consistency" measured in the scope of hours, its not really that big of a deal to wait for the belt of science-packs to fill up to its steady state level.

And by "wait", I mean, "play the other elements of factorio while waiting". I know its going to take 3 or 4 hours to happen, but I know it will happen with 100% certainty because I have confidence in the design. So I do it, and move on to base expansion / building more train outposts or other manually-intensive jobs.

--------

In any case, "just expand steel" turns out to be one of the easier tasks. I don't know if you knew steel was specifically a high-compression item worthy of attention like this, but... that's an explicit strategy. One that took me many, many playthroughs to understand and take advantage of.

Re:The Factorio Mindset by p_l on Sunday February 13, 2022 @08:10AM (#30321523)
Usually we fix that with trains, and in some of our last games we started working on pull (or Toyota) model of resource management, with smelting blocks colocated with metal patches, and various sub-factories pulling resources in by signal-triggered trains
Re:The Factorio Mindset by dragontamer on Sunday February 13, 2022 @01:10PM (#30323967)
At train scale, the problem is solved by trains.

I guess I'm talking about the earlier game, where I've seen many, many players 'get stuck at blue science'.

A lot of players get stuck there because you need to advance to the 2nd iron patch around then, because the starter patch is too small to sustain red circuit production.

Or I guess you can wait like 10 hours for that small patch to make enough red circuits.

But yes, a well designed train network solves the problem. But that's a nonobvious step for many players.

--------

Main bus style does work through that stage of the game, but requires preplanning.

--------

If you wish to keep your old design (aka: no restarts), building a 2nd base and connecting the two bases up (either with trains or belts) really is the answer.

In any case, the game's default settings force you to expand in the blue to purple science period, before all options of the tech tree are available.