Oxygen Not Included

Oxygen Not Included

View Stats:
Puma Apr 3, 2024 @ 8:28am
Polluted oxygen getting constantly stuck
Apart from "Klei programming bad" what the frack is going on with the gasses here?

https://steamcommunity.com/sharedfiles/filedetails/?id=3211131675

I have oxygen at 2g of pressure at the top of the room, and polluted oxygen at 2150g of pressure at the bottom of the room, and the oxygen just occupies a huge space and not letting the polluted oxygen expand.

I'm in the middle of my first playthrough, and polluted oxygen has managed to get stuck in the same room above regular oxygen and below regular oxygen, on multiple occasions, so it's not an issue of density, nor is it a rare edge case.
< >
Showing 1-15 of 35 comments
The Queen Salis Apr 3, 2024 @ 9:00am 
you expect one gas packet to move UP to immediately push another gas packet LEFT.
That's tricky business.
Try removing that corner tile.
The gas packet mechanic is limited by necessity, and you do need more open squares to work with. They aren't simulating fully accurate fluid dynamics on the fly here, it's a game. A game that isn't meant to fry your rig. That does mean dealing with occasional nonsense.

Remove that upper corner tile and make the floor gap a 2-square for good measure. Then report back.

Remember to switch that gas pump off because once that vacuum collapses, the poxy will be moving quickly
Last edited by The Queen Salis; Apr 3, 2024 @ 9:07am
Puma Apr 3, 2024 @ 9:21am 
I also had a room where there was a 1 tile high, 2 tiles wide hole in the ceiling. And those two squares got filled with polluted oxygen that was just happy to sit there forever, above the regular oxygen. That was 2 wide and it made zero difference.

And it's obvious that the game isn't doing accurate fluid dynamics, but what is it doing? 😹
Tregon Apr 3, 2024 @ 9:29am 
Originally posted by Puma:
I also had a room where there was a 1 tile high, 2 tiles wide hole in the ceiling. And those two squares got filled with polluted oxygen that was just happy to sit there forever, above the regular oxygen. That was 2 wide and it made zero difference.

And it's obvious that the game isn't doing accurate fluid dynamics, but what is it doing? 😹
Gas does not like going through small spaces.
Two wide might not be enough if for whatever reason you manage to fill those two cells with something like polluted oxygen while there is none around them.

I would take away all corner pieces to maximise room for gas to move.

Also airlock doors might restrict movement even though they are locked open. It might be better to not have it between pump and oxygen source. Or alternatively build airlock door pump by opening and closing more of them in timed rhythm to pump air to pump room.
cswiger Apr 3, 2024 @ 9:54am 
Originally posted by Puma:
And it's obvious that the game isn't doing accurate fluid dynamics, but what is it doing? 😹
It's doing the cellular automata approach to fluid dynamics, because solving Navier-Stokes is extremely hard.
PepeMilagro Apr 3, 2024 @ 9:57am 
Make corridors/chimneys with two tiles and 05 deodorizers, you'll sleep like a princess after that :steammocking:
No need to do the complicated zigzags as per your screenshots.
Polluted water is indeed a great and cheap source of O2 :steamthumbsup:
Last edited by PepeMilagro; Apr 3, 2024 @ 9:58am
Puma Apr 3, 2024 @ 12:10pm 
Originally posted by cswiger:
It's doing the cellular automata approach to fluid dynamics, because solving Navier-Stokes is extremely hard.
Seeing that all the gasses are everything-else-phobic, and behave like lego blocks, Navier-Stokes equations would be absolutely useless in this use case.

In some instances whenever there is a boundary line between a lighter and heavier gas, there is a substantial amount of boundary jitter, other times it's absolutaly static. Sometimes the polluted oxygen just travels at random directions in regular oxygen, other times it just sits still in a corner. There is obviously some sort of cellular automation algorithm going on here, but I don't understand what the rules are. Sometimes one gas at high pressure absolutely expands, while other gas at lower pressure compresses until the pressures are equalized. But why in this particular case isn't the regular oxygen compressing, even tho the pressure ratio between it and the adjacent gas-cell is a thousand to one, and there are plenty of adjacent regular oxygen cells to merge with? Like what is going on with the cellular automation?

Also I forgot to mention, that when I originally punctured the polluted oxygen containment, the polluted oxygen did flow out through the hole for quite a while, until it suddenly became stuck. So there is nothing fundamentally wrong with the shape of the corner that prevents gasses from flowing. It just seems random.

Originally posted by Tregon:
Two wide might not be enough if for whatever reason you manage to fill those two cells with something like polluted oxygen while there is none around them.

I would take away all corner pieces to maximise room for gas to move.

Also airlock doors might restrict movement even though they are locked open.
Superstition much? 😹 Having bad juju in your chakra might also restrict gasses from flowing. Also dupes with red clothing might restrict gas flow.

I hate these sort of engineering games where you're stuck in endless trial and error. What ever engineering solution you come up with, will either work or not work at random. And even if you verify that something works, you might end up coming back later only to notice that it has stopped working for no apparent rhyme or reason.
cswiger Apr 3, 2024 @ 12:38pm 
Originally posted by Puma:
Originally posted by cswiger:
It's doing the cellular automata approach to fluid dynamics, because solving Navier-Stokes is extremely hard.
Seeing that all the gasses are everything-else-phobic, and behave like lego blocks, Navier-Stokes equations would be absolutely useless in this use case.
Thanks for supporting my point. Your "lego blocks" are known as "cellular automata".

The reason for the one-material-per-tile rule is to simplify the physics calculations sufficiently that they can run in realtime on commodity PC hardware, rather than the NASA-style supercomputers used to more accurately model turbulent flow involving non-ideal gasses (which includes mixtures of gasses) or liquid flow.

Because the simplified physics model only has per tile state changing based upon their immediate neighbors, the game cannot model gas pressure, wind, or turbulent liquid flow.
Puma Apr 3, 2024 @ 1:28pm 
Originally posted by cswiger:
Thanks for supporting my point.
Not my point. My point is that you have to have a world where flowing is at all possible for calculating flow dynamics to be of any value.

It like if in a game of chess, I come to a forum saying that "I don't understand how these pawns attack. Sometimes I'm allowed to attack diagonally to the left or right. But sometimes even tho there is an enemy diagonally to the right, the game won't let my pawn attack it. What gives?"

And your answer is that diagonal attacks on the grid are much simpler than ballistic calculations that take into account shape, mass, spin and velocity. While true, also completely irrelevant, and doesn't help me understand why game sometimes won't let me attack. And then you go off on a tangent about how chess doesn't model physical wounds or infections.

Originally posted by cswiger:
Your "lego blocks" are known as "cellular automata".
A lot of things fall under the umbrella of "cellular automata". Even if every cell was able to hold a mixture of gasses, it would still be cellular automation. There is no hard upper limit as to how much data or properties single cell can hold. The fact that the gasses are everything-else-phobic is and behave more like loose lego blocks rather than gasses is a particular quirk of this particular cellular automation implementation, not a feature that defines cellular automata in general.

I cant emphasize enough that I super-duper don't care why gasses don't mix. The fact that they don't is the fundamental reality of the game mechanics. Taking that as the unalterable starting point, my question is why sometimes low pressure gas doesn't merge with a neighboring cell of the same type even when there is a neighboring cell of different gas with a thousand times more pressure.
cswiger Apr 3, 2024 @ 4:35pm 
Originally posted by Puma:
Originally posted by cswiger:
Thanks for supporting my point.
Not my point. My point is that you have to have a world where flowing is at all possible for calculating flow dynamics to be of any value.
Well, one can easily dig out tiles resulting in water flowing over an edge.
That's a situation which ONI handles, but poorly.

Irrelevant analogy to chess deleted.

Your "lego blocks" are known as "cellular automata".
A lot of things fall under the umbrella of "cellular automata".
Correct. In particular, ONI is a cellular automaton simulation.

Even if every cell was able to hold a mixture of gasses, it would still be cellular automation.
No. Cellular automation work from the principle that each cell is represented by a simple or at least finite state. Arbitrary combinations of materials such as gasses have complex properties that cannot be modeled using finite state machines.

There is no hard upper limit as to how much data or properties single cell can hold.
Wrong. It's part of the definition:

https://en.wikipedia.org/wiki/Cellular_automaton

"A cellular automaton (pl. cellular automata, abbrev. CA) is a discrete model of computation studied in automata theory. Cellular automata are also called cellular spaces, tessellation automata, homogeneous structures, cellular structures, tessellation structures, and iterative arrays."

Non-homogeneous cells are never going to be handled well by a CA model.

my question is why sometimes low pressure gas doesn't merge with a neighboring cell of the same type even when there is a neighboring cell of different gas with a thousand times more pressure.
It will over time, unless one is exploiting mechanics like the overpressure check by using some liquid on the floor of the tile of interest.
Originally posted by Puma:
Apart from "Klei programming bad" what the frack is going on with the gasses here?
Gas layered that way and won't budge, much like hydrogen or CO2 settles near either vertical edge allowing for painless gas sorting, or how chlorine can be distributed uniformly across a single horizontal layer in drecko farms.

You can accomplish what you want to do by placing deodorizers atop mesh tiles holding a liquid all above airflow tiles.
Puma Apr 3, 2024 @ 5:42pm 
Originally posted by cswiger:
Irrelevant analogy to chess deleted.
Analogies aren't supposed to be relative. They are analogous.

Originally posted by cswiger:
Correct. In particular, ONI is a cellular automaton simulation.
...
No. Cellular automation work from the principle that each cell is represented by a simple or at least finite state. Arbitrary combinations of materials such as gasses have complex properties that cannot be modeled using finite state machines.
...
Wrong. It's part of the definition
So... every cell is able to hold a number of overlapping structures, overlapping pipes carrying liquids and gasses (each preserving temperature and number of germs), keep track of the mass, temperature and material of said structures and pipes, as well as any number of solid materials (each tracking the mass, temperature, specific heat capacity and thermal conductivity, as well as surface germs), and variable amount of one gas of variable temperature holding variable amount of airborne germs (each different gas having a set of unique constants such as specific heat capacity and thermal conductivity), and this is all just simple finite state cell. But add a second gas... and then.... we have crossed a line.

Once you have just three floating point variables being tracked per cell, you can't really in good conscience call it finite state anymore. While the number of unique value combinations of those variables is technically finite... it is only technically. For all practical purposes there might as well be infinite possible states.


There are just handful of gas properties the game keeps track of, all of which can be mixed simply with weighted averages.
The temperature of a mixed gas would obviously be shared inside the cell.
Airborne germs would also be shared by the gasses in the cell.
Specific heat would be the weighted average of all the compound gasses, same for the conductivity, for the purposes of thermally interacting with other objects in the cell.

From a purely computational point of view, gas mixing wouldn't be adding all that much complexity, when compared to what the game currently has.

Originally posted by cswiger:
It will over time, unless one is exploiting mechanics like the overpressure check by using some liquid on the floor of the tile of interest.
It didn't tho. The screenshot is from a stable situation that had held unchanged for god knows how long when I wasn't paying attention. And after I noticed it, I let the game run for a couple of days to see if it will unstuck itself. It didn't.
cswiger Apr 3, 2024 @ 7:49pm 
Originally posted by Puma:
Originally posted by cswiger:
No. Cellular automation work from the principle that each cell is represented by a simple or at least finite state. Arbitrary combinations of materials such as gasses have complex properties that cannot be modeled using finite state machines.
...
Wrong. It's part of the definition
So... every cell is able to hold a number of overlapping structures, overlapping pipes carrying liquids and gasses (each preserving temperature and number of germs), keep track of the mass, temperature and material of said structures and pipes, as well as any number of solid materials (each tracking the mass, temperature, specific heat capacity and thermal conductivity, as well as surface germs), and variable amount of one gas of variable temperature holding variable amount of airborne germs (each different gas having a set of unique constants such as specific heat capacity and thermal conductivity), and this is all just simple finite state cell. But add a second gas... and then.... we have crossed a line.
Somewhat correct. Your first error is that structures don't overlap.

You can have a structure in the foreground, which is what dupes interact with. You have a background layer, which can be filled with drywall or tempshift plates. You have a set of other layers for plumbing and power.

But you only get one entity per layer. You cannot have two different kinds of pipes in one tile, nor two different types of liquids or gasses in the same tile, nor two different kinds of wire, etc.

Once you have just three floating point variables being tracked per cell, you can't really in good conscience call it finite state anymore.
Your second error is that whether a system can be represented by a FSM or a stack-based automata is not a matter of whether it uses integer or floating point values. Refer to:

https://en.wikipedia.org/wiki/Finite-state_machine
https://en.wikipedia.org/wiki/Automata_theory

ONI uses computationally simple interactions because it has about ten milliseconds per frame to compute each game tick.

There are just handful of gas properties the game keeps track of, all of which can be mixed simply with weighted averages.
Your third error is your assumption that this "simple" approach would work, when it actually leads to obviously wrong answers. The material properties of Hydrogen and Oxygen are wildly different from the properties of HHO or H2O in the form of Steam.

Specific heat would be the weighted average of all the compound gasses, same for the conductivity, for the purposes of thermally interacting with other objects in the cell.
This just doesn't work. Conservation of mass means you can add masses together, but density, SHC, TC, and most other intrinsic properties don't work that way. Check the density, SHC, and TC of H2, O2, Oxyhydrogen gas (aka HHO) and Steam yourself.

(For that matter, one might be surprised to learn that dry steam and "wet" or saturated steam has significantly different properties, for all that it is nominally the same material.)

Real gasses aren't ideal. This is especially true of polar molecules like water, which is remarkably complicated to simulate correctly. And then some of it self-disassociates into hydroxides[en.wikipedia.org] and hydroxls[en.wikipedia.org].

From a purely computational point of view, gas mixing wouldn't be adding all that much complexity, when compared to what the game currently has.
It is obvious that you've never programmed computational chemistry, because you are wrong. Computational chemistry involves multiple NP-hard problems.

https://imgs.xkcd.com/comics/physicists_2x.png
Tregon Apr 3, 2024 @ 8:52pm 
Originally posted by Puma:
Superstition much? 😹 Having bad juju in your chakra might also restrict gasses from flowing. Also dupes with red clothing might restrict gas flow.

I hate these sort of engineering games where you're stuck in endless trial and error. What ever engineering solution you come up with, will either work or not work at random. And even if you verify that something works, you might end up coming back later only to notice that it has stopped working for no apparent rhyme or reason.

No, facts and reality of limitations of software.
I hate fools who refuse to accept reality of lightly simulated science related issues and demand solutions that would make unplayable on anything but supercomputer.

Learn how things work and you can then build things that work.

And reason for wide spaces, for those actually interested, is that it makes it more likely for gas packet to be routed to new position which requires another gas packet (in absence of vacuum) to be moved away from that destination cell.
Puma Apr 4, 2024 @ 3:13am 
Originally posted by cswiger:
Your second error is that whether a system can be represented by a FSM or a stack-based automata is not a matter of whether it uses integer or floating point values.
It kinda is tho. Gasses in the game aren't simply determined by their "state". Gasses aren't just "hot" or "cold". Not are they at "high pressure" or "low pressure". And the gasses don't react to the other layers simply by transitioning between these states.

The state of a gas-cell that is hot/cold and high/low, can be represented by 2-bit integer, for a total of 4 possible states. They can give off thermal energy if they are hot, and only the amount of energy that will transition them from hot to cold. And vice versa if they start as cold.

In ONI there are virtually infinite states in which a gas-cell can be in. And they don't just interact by transitioning between finite states. Any arbitrary amount of thermal energy can be given and received during a single simulation tick. By the definitions you yourself quoted, ONI is not a cellular automation game. Any complexity boundary that excludes ONI from being categorized as a cellular automata isn't in danger of being crossed if gasses mix, that boundary has been crossed so far back that you can't even see it from here.

But in the end it doesn't matter how we choose to categorize levels of simulation. There are literally infinite levels of complexity in which gasses can be simulated in a video game. And pretending that the next step up from ONI is supercomputer modelling, is just intellectually dishonest and dumb.

Originally posted by cswiger:
This just doesn't work. Conservation of mass means you can add masses together, but density, SHC, TC, and most other intrinsic properties don't work that way.
It has been stated before in this thread, but... it's a video game. It totally could work that way. It would differ from reality in a different way than everything-else-phobic gasses.

For an example: in game a 50-50 mix of oxygen and carbon dioxide could have the density, THC and TC that is exactly half way between the two gasses. Real gasses may not be ideal, but video game gasses absolutely can be. It would "work" just as much as the current non-mixing gasses, if not more. "Just doesn't work" isn't a real argument. It would work because there are no real problems that arise from doing it that way. Feel free to point out an issue that would arise from treating the gasses as ideal gasses in a video game.

"Because simulation simple" is not an explanation. If simulation so simple, can somebody tell me what the frack is going on with the oxygen not compressing.


Originally posted by Tregon:
No, facts and reality of limitations of software.
No. A fact is something that you know is happening. Saying that open airlock door 15 tiles away MIGHT impede gas-cells from merging is wild speculation at best, and cultivation of a superstition at worst.

We could devise a series of experiments to factually determine if and how open airlocks affect gas movement in game. My intuitive guess is that they have about the same effect as dupes wearing red clothing.

Going back to the chess analogy, if you say that "Having your 'white square bishop' in an adjacent square to a pawn, prevents the pawn from attacking diagonally to the right." then that would be an assertion of a fact. But as soon as you add the word "might" in the sentence, it just becomes speculation.
Bobucles Apr 4, 2024 @ 9:16am 
ONI gas is very thick and creamy. Do not expect it to flow around that easily. Think of it more like a slow moving sludge. It will be very difficult to get any kind of flow through a one tile gap.
Deodorizers are excellent at pulling air up from under them. Place a solid row of deodorizers, then put a line of airflow tiles under them. It should be reasonably effective at separating the gases and keeping the clean side pure.
< >
Showing 1-15 of 35 comments
Per page: 1530 50

Date Posted: Apr 3, 2024 @ 8:28am
Posts: 35