Because I haven’t wasted enough time on this project yet.
Reply chain from #27
each chunk is handled separately, each block has the gases and velocity (cause simulating billions of particles would be uhhh… yeah).
each tick, each block (in a random order) decides how much it needs to push to neighboring blocks. it pushes out however much it needs to to return to 1 pressure + 6/7 of the gas in that block (it also supports multiple gas types at the same time)
then it decides how much of the amount to push out, should each neighbor get. this depends on the neighbor velocity dot product this velocity, the difference in pressure between the neighbor and this block, etc.
then it moves it and adjusts the velocity of the current block according to how much it pushed in that direction.
if the amount of a gas in a block ever drops below a threshold, destroy the gas.
i pushed 10000 pressures of gas in the nozzle in the video above. it was pushed out pretty quickly.
it runs independently of the server world ticking. each dimension runs independently of each other. each dimension is allocated 16 threads (by default).
it runs fine
🙂
[WARN] Gas WORLD `minecraft:overworld` has fallen 17 ticks behind.
This conversation is on Discord · Reply there