Factorio – Visualizing construction material dependencies

(community.wolfram.com)

184 points | by bschne a year ago ago

88 comments

  • dimava a year ago

    The most advanced calculator for Factorio is definitely YAFC, "Yet Another Factorio Calculator", based on Google's OrTools solvers [https://github.com/shpaass/yafc-ce] (gifs readme at [https://github.com/shpaass/yafc-ce/blob/master/Docs/Gifs.md])

    The flowcharts are generally made with Foreman2 [https://github.com/DanielKote/Foreman2], yet another external tool

    Both the calculator websites, https://factoriolab.github.io and https://kirkmcdonald.github.io also have both Sankey and Box-line flow diagrams

    In-game calculator mods are Rate Calculator (that just shows the production ratios of selection), Helmod and Factory planner, don't have flow diagrams afaik

    ---

    But with the new 2.0 DLC Quality and Recycling mechanics which makes every graph connection quintuple and bidirectional, the difficulty to calculate what's the best way to craft something of high quality is going to skyrocket

  • karamanolev a year ago

    Side note, Factorio 2.0 + Space Age is coming in a few days (Monday, the 21st). Ardent players, be ready to press the pause button on your non-factory life and dive deep.

    • birracerveza a year ago

      It's weird to know the date of your death (of your social life, at least).

      • HPsquared a year ago

        The Factorio forum is your new social circle.

        • p_l a year ago

          In my case, it was the channels the regular group met... OTOH, we already met there before Factorio, we just got dragged into Factorio together...

    • fouronnes3 a year ago

      Factorio is crack for programmers.

    • vincnetas a year ago

      NOOOOOoooooooooooOOooooooooooooo.... I was/am sober for more than a year now...

    • Gravityloss a year ago

      I guess I'm old but in many of these games, they don't get any better if just more stuff is added. It's already complex enough.

      Civilization: add more civics and techs and special resources, more civs, more units... It doesn't bring anything to the game. It just makes the excel more annoying to deal with. I paid for Phoenix Point (from the creator of XCOM). Nice game but when they asked for feedback it was just about wishing either more units or more maps or more factions, which would you prefer? None! How about making the core mechanic more fluid so there's less "oh I didn't mean that"? Or the crashing and having to start over after many updates.

      What would really make Factorio better? I don't know. Maybe a simplified interface? There's so many ctrl-click things and having to place and stock turrets in a hurry that it just makes me not want to start the game etc.

      • fabian2k a year ago

        The expansion is extensively described in the Factorio blog entries. There are a lot of new mechanics there, they tried to avoid having the new planets to be just more of the same. We'll see how well they succeeded.

        There are also a lot of Quality of Life changes in the new version.

        • oefrha a year ago

          I’ve read all of the FFFs as they came out. I have a feeling that between space platform constraints, spoilables, and recently revealed heating mechanics, they may have taken the logistics puzzle idea a bit too far for the average player. This is coming from someone who has finished Space Exploration (spaceship victory, not the crazy secret puzzle victory).

          Guess I’ll have to wait and see for myself when I have organized my life around another Factorio dive.

          • mithametacs a year ago

            Anyone who buys an expansion pack to Factorio is a logistics masochist. And they know it and that’s fine.

      • kzrdude a year ago

        Space exploration, the mod, added so much more than just more, it added new kinds of logistics and an exciting setting of exploration and gradual conquering of a solar system.

        I would say, still, that SE was the missing expansion so I've already had the expansion and I'm not that tempted by the new updates (Except for elevated rails!)

        The SE author also showed impeccable taste in game design, improving on the base game, their beacon change being a good example, running over pipes another one.

      • zelos a year ago

        Agreed. Adding more choices doesn't make a game more complex if the choices aren't meaningful: to me it feels like adding fake depth.

      • bryanlarsen a year ago

        I'm firmly in the "Civ 1 was the best Civ" for this reason, along with being able to play an entire game in a single extended sitting. But surveys show that all other versions of the game poll significantly higher.

        • Gravityloss a year ago

          I agree. Have played all but Civ 4. Civ 1 has a few faults like way too many game deciding dice throws. Say a turn 6 goody hut spawns either a new city basically doubling your victory chances, or 6 barbarians most likely ending your game really soon. But it's still the best overall. It seems they really understood the power of decisions there. There's no decision clutter about 15% bonuses or so.

      • DilutedMetrics a year ago

        That's how I feel when I jump back into CK3 for a bit every few months and there's a new mechanic in my existing playthrough

        • philistine a year ago

          Hopefully the Factorio expansion doesn’t feel like the constant new buttons added to CK and EU. Those ultimately add nothing to the experience. Why do we need a fourth way to spend political points to improve your regions?

      • 7bit a year ago

        > What would really make Factorio better? I don't know. Maybe a simplified interface? There's so many ctrl-click things and having to place and stock turrets in a hurry that it just makes me not want to start the game etc.

        Have you actually read what new content is coming, or are you just saying things?

        There is a ton of new mechanics. Theres a ton of improved mechanics. And then there's a ton of new content. Everything you critises as missing is actually in the DLC

    • iwontberude a year ago

      github commit, pr creation/merge, stars frequency would probably noticeably decrease. would love someone to accidentally leak some observability dashboard as a meme. MSFT is a big company, no one will find you, its cool.

    • esjeon a year ago

      Factory must grow.

    • a year ago
      [deleted]
  • jnwatson a year ago

    There are several Factorio dependency trackers and calculators already. Importantly, there are several mods that make the vanilla game's graph look like child's play.

    The real innovation was just teased at the end. Balancers (systems of belts and splitters than evenly distribute the contents of n belts to m belts) are tricky to get right and compact and so far as I know are only human-designed. A mechanism to automatically design them would be very interesting.

    • orangepanda a year ago

      You're in luck! There is a SAT solver for finding the optimal belt balancer for any size (Though it might take a few months/years to compute)

      https://github.com/R-O-C-K-E-T/Factorio-SAT

      • red_admiral a year ago

        Looking at the big one, I have an idea for a screensaver.

        • egeozcan a year ago

          I would be very thankful if somebody actually did this!

          Also make it dynamic so every time screensaver activates CPU gets hot, heating the room, removing the need for me to keep pressing the space bar.

    • a year ago
      [deleted]
  • dmurray a year ago

    When I saw the domain I assumed it would be Stephen Wolfram's blog and he'd soon be detailing how, instead of writing a dozen books and developing a new kind of science and changing the way all of computing works, he'd spent 5 years building the bestest Pyanodon megabase.

  • perihelions a year ago

    For those unfamiliar, there's alternatively a standard FOSS tool, graphviz, that's roughly equivalent to what these Wolfram examples do. It has a trivial syntax: this is a complete example that draws exactly what it says,

        digraph { a -> b -> c -> a }
    
    Here's minimal syntax for drawing directed graphs with image nodes, in the style the Wolfram example uses:

        digraph {
            node [label="", style="none", shape="plaintext",
                  fixedsize="true", imagescale="false",
                  width=1.0, height=1.0]
            copper_plate [image="Copper_plate.png"]
            copper_cable [image="Copper_cable.png"]
            copper_plate -> copper_cable [label=" 50 trillion"]
        }
  • MaxikCZ a year ago
  • nusl a year ago

    With Satisfactory's recent 1.0 release and Factorio 2.0's upcoming release, I'm really loving that factory games are being recognised more widely. They're incredibly fun, addictive, and rewarding. I've sunk quite a lot of time into Satisfactory but less into Factorio. Perhaps 2.0 is a good time to start.

    Satisfactory has a range of useful tools like this to plan your factory (if you don't want to do it manually), and they can quickly explode in complexity.

    At first it's mind-bogglingly daunting but breaking it down into smaller parts then addressing them down the DAG makes it more digestible. When you finally complete an end goal it's very satisfying.

    • scotty79 a year ago

      > Satisfactory has a range of useful tools like this to plan your factory

      I think Satisfctory has some interesting game design choices that promote that. Since mines give a fixed round number of primary resources and factories also process round number of items like 15, 12, 30, 60, 90 and so on I'm immediately incentivsed to think how many factories of each type do I need along the chain so so that all inputs are processed. No other game prompted me to do this much simple math in my head. Thinking about whole network of dependecies with their throuput is the natural next step and since it's getting unwieldy for a brain then writing a tool for this is the next one since you already understand what the tool needs to do very well because you were doing it yourself up to that point.

      In games like Factorio or Dyson Sphere Program the information about throughput of factories is somewhat obscured so it's not easy to do these calculations in your brain so I don't do that and just go with visual feedback about whether factory is starved or overwhelmed.

      • nusl a year ago

        I struggle with DSP or games where I can't determine throughput of a building for that reason. It's hard to plan things when you don't know how much will be used. I like having numbers for these kinds of things.

        • scotty79 a year ago

          In theory you can calculate throughput because they say for example that single production cycle takes 5 seconds, uses 3 units of substrate and produces two units of a product. So input is 3/5×60 per minute and output is 2/5×60 per minute. But that's too much for me to be doing in my head all the time so I don't. Satisfaction is nice enough to just give you result and ensures it's somewhat round so you can do further calculations with it in your head.

          • nusl a year ago

            Okay, I wasn't aware of this. I've played another game named Oddsparks Automation Adventure where the "conveyor belts" are individual units that carry items, and the throughput is calculated by how long the walking track is combined with how many units are on that track.

            I don't really have the will to do the math in my head either, specially since things may change frequently as you upgrade/add/remove things and a throughput at one place causes a cascading change throughout the production chain.

  • Seb-C a year ago

    I am developing a game called Astral Divide, which has in common with Factorio to have factories and a tech tree.

    Until this week, I had a fancy tree visualization similar to the article's content (except that the location of the nodes was hardcoded). I spent quite some time to implement it and get it right, and it was difficult to maintain and update when adding new content.

    Also, one feedback that I got from early testers is that this is confusing, and they didn't know how to read it.

    I think that the main problem is that in such a graph, it is difficult to know if a branch means "A is an ingredient to make B" or "A is a machine that you can use to make B".

    I spent time this week replacing it with a dumb list showing individual recipes in the form of an equation like "A = B + C", and I find it not only easier to understand, but also way cheaper to maintain.

    You can see the previous version in one of the screenshots (fifth thumbnail): https://store.steampowered.com/app/2597060/Astral_Divide/

    And the first draft of the new version: https://mastodon.gamedev.place/@sebc/113327870376150885

  • red_admiral a year ago

    Good graphs, but if possible I'd have put labels on the edges showing resource required per second or something like that to keep the production line running. Some of these need a lot more iron than others.

    Then you can go figure out how many iron ore mining drills you need to keep a purple science factory running.

    • implements a year ago

      http://doomeer.com/factorio does that. You can specify how many of each product you want to produce per second, minute or hour and it shows how many assemblers and what raw material production is required.

    • zelos a year ago

      That's starting to sound like State Task Networks/Resource Task Networks from production process design/scheduling.

      • p_l a year ago

        high-end factorio is all about process design/scheduling, IMO...

  • jeffhuys a year ago

    Oooh, I love Factorio, code, and graphs. What a treat! This'll come in handy soon; JUST finished my starterbase and want to use it to create a "megabase" (or probably "mediumbase" since it's my first time).

    Thank you for sharing!

  • teekert a year ago

    Those are Directed Acyclic Graphs (DAGs), like used in make, and Snakemake. No mention of that word though. There are some nice libraries and visualization tools for DAGs.

    • benplumley a year ago

      That's a coincidence, that the author only picked recipes that are made without cycles. Other Factorio recipes (e.g. nuclear fuel processing) are cyclic.

      • perihelions a year ago

        There aren't any other ingredient cycles in unmodded Factorio (besides the trivial barrelling/un-barrelling of fluids).

        • benplumley a year ago

          I thought you could go between heavy and light oil cyclically, but I think the recipes I'm thinking of are from UltraCube. The others are a subset of nuclear (Kovarex and reprocessing), so I think you're right.

  • fergie a year ago

    Is Factorio HNs favourite game or is it Civ V?

    • fabian2k a year ago

      Factorio is much more like software development. Especially when you notice that your earlier assumptions were wrong and you need to refactor your base, tearing down all the stuff you build earlier.

      • Iulioh a year ago

        And the fact that the dev has a weekly newsletter with dev updates, that helps

        FFF (Factorio Friday Facts)

        https://www.factorio.com/blog/post/fff-432

        • fabian2k a year ago

          Today will be the last FFF before the expansion launches next week.

      • kgf1980 a year ago

        I’ve tried Factorio and could never get into it … Satisfactory on the other hand is a game where I can look at the time and realise I should of had lunch two hours ago

    • kentrf a year ago

      Factorio.

      As a developer, I'd never thought I'd like to solve for getting off the planet, fighting monsters, building trains and tracks while trying not to pollute too much.

      • Iulioh a year ago

        The last part is a truly unrealistic

        • rollcat a year ago

          If you find pollution is not a challenge, try a deathworld run. If you can already beat a normal deathworld - turn down trees/moisture, turn up pollution diffusion ratio; then you can add rampant, armored biters, bob's enemies, etc. I recommend the infinite ore patches mod as well, you will be defending the starter patch for a veeery long time.

          My favourite recent challenge was "New Game +", you start with all tech (perhaps except damage upgrades) unlocked, but biters also start at 1.0 evolution. You technically don't need any science to launch a rocket, but you still have to figure out how to build a mall (and enough defences) before triggering a single attack.

          Factorio is an excellent tower defense game!

          • jeffhuys a year ago

            > Factorio is an excellent tower defense game!

            It really is, isn't it. You're incentivized to protect every last thing, not because of some arbitrary points system, but because they're all part of a big, interconnected system that needs to work in order to survive.

            In my book, Factorio is up there at the top of best games of all time.

    • changexd a year ago

      I really want to try factorio, but now I usually see games as non-productive activity (that's my problem and I know it, in my defense, I've already spent way too much time gaming in college and did nothing), I wonder if factorio can make my software skill better in terms of designing and critical thinking, if that's the case, I would love to have fun and practice as well

      • jeffhuys a year ago

        Factorio is definitely good for your brain - it rewards focus, refactoring, problem solving, linear thinking... But yes, in the end, it's non-productive in any physical sense.

        A weekend of watching movies/shorts feels way worse than a weekend growing the factory. It's definitely a step up, but the best would be to get out of the house more often besides going to the office.

        One day at a time (recovering from a lot of past emotional pain).

      • fouronnes3 a year ago

        It's a great game but if you play it you WILL get addicted. Approach it with the care you would have when trying a new recreational drug.

      • bregma a year ago

        Non-productive activity time is a Good Thing that improves everybody's life when done in moderation. At least Factorio is generally better than drinking, doomscrolling, or gambling in terms of social responsibility.

    • voidUpdate a year ago

      I'm expecting a large dropoff in HN activity when the new expansion releases

      • red_admiral a year ago

        I'm half expecting FAANG stocks to move downwards as engineer productivity takes a hit.

        • HPsquared a year ago

          Hedge funds currently trying to work out how long they expect the developers to be enthralled with the Factorio update.

    • veidelis a year ago

      My vote goes to Oxygen Not Included

      • MaxikCZ a year ago

        I want to love that game, but it has sharp corners that you only discover with time, and that require painful workarounds. Factorio devs, on the other hand, actively eliminate almost every such case, making the playtrough just pure bliss

        • HPsquared a year ago

          That's something I have noticed with a lot of really good games. The edges are all lovingly smoothed off by hand. It's a lot of work.

    • bschne a year ago

      I don't know, but I have to say I was surprised how quickly this one took off, esp. given it's the middle of the night across the U.S. :)

    • y1n0 a year ago

      I’ve played a lot of factorio but it did eventually get old for me.

      In the same vein I am enjoying shapez (search for the free web version) and shapez2

    • zigman1 a year ago

      is Civ big on HN? I rarely see it mention. Its my favorite, so would love to find people here who enjoys it as well

      • yen223 a year ago

        Please don't drag me back in, I've already lost a good chunk of my twenties to that game

        • liotier a year ago

          Considering how Civ' impacted my student years, I wowed to never touch it again. I thought I would never suffer addiction - I was wrong.

        • zigman1 a year ago

          Did you see the Civ VII announcement? ;)

          • yen223 a year ago

            There goes my thirties too I guess

    • dailykoder a year ago

      I like tetris. I found these two to be the most fun for me:

      - https://www.goodoldtetris.com/ - http://farter.cn/tetr.js/

      First one is "NES-style" with fast lock in, no ghost and so forth. Second one is for fast play, with ghost and no fast lock-in. I have no clue about current tetris, but i think that's the modern style, no???

      Edit: I believe tetris friends was the website where i started playing more tetris some years ago and the version from farter came closest to it, after it got shut down

  • seanhunter a year ago

    This is perfect timing - just when Space Age is about to come out.

  • cetu86 a year ago

    Wow, looks nice! Can you do that for SE and add quantities?

  • ilrwbwrkhv a year ago

    Wolfram and Mathematica are such interesting tools. Maybe one of the only two tech companies that won capitalism along with Valve.

  • Nihal_rg a year ago

    Where can I buy/install this game?

    • MaxikCZ a year ago

      Factorio.com, steam, gog....

  • a year ago
    [deleted]
  • hdjfjjfjc a year ago

    [flagged]