Posted July 13, 2018 by Munro
Did some more work on the way steam flows visually and dungeon movement. Tomorrow I'll try to get some combat stuff in.
Work done:
I also took a look at Factorio's liquid mechanics and found that Zach had posted an explanation Bureau of Steam Engineering's flow equation. Short answer: Factorio ran into the same problem of not calculating multiple connections at the same time, which means that a tee junction will always favor one direction over the other. Reminds me of the Knapsack Problem where calculating the right distribution is mathematical challenging. Was pumped when I found Zach's own explanation of BSE:
For the curious: the pressure algorithm works by iterating over all paired connectors, each with a volume estimate and a pressure, and exchanging a “steam amount” (representing n in the equation PV = nRT) to neutralize the pressure between the two components. This is repeated until the pressures between each pair of connectors are neutralized to an acceptable degree (I believe I used a value of around 0.15 PSI).
Less pumped when I realized I've forgotten a lot of algebra. Any case I think I'm going in the right direction, will try mess with some numbers and seeing if I can smooth it out. Worse case scenario I just up the tick speed and decrease the incoming steam and it will sort itself out. Also joined a game jam to give me a more of a sense of time-frame and meet some new people. If any are reading, hello! Can't wait to see what you come up with!