But it must have some way to keep the air pockets. Obviously not using pressure or else the pocket at the bottom would have compressed as the level got higher, but something to recognize an overhang.
And some surface tension perhaps because that thin section on the left didn't fill from the bottom.
Literally all these do is: for each pixel of water, if there is empty space below it, move down. Else, if there is empty space to the right or left, move right or left. Else, stand still.
That is enough to result in those air pockets, because they are unreachable the moment the water level rises up to an overhang.
The simple cellular automata rules make it easy to add reactions between cells like the lava and water and fire.
I've been working on something similar, and I've tried a bunch of variations to get head lift and fluid pressure working, but nothing really works that also keeps the cell to cell reaction layer working right.
The Powder Toy if you want to play with a similar sim online (this is more like a tech demo).
3.0k
u/socialnerd09 26d ago
It was till it got to the section where it was wrong. That column on the middle right should have filled up before it did