I'm releasing a new version with a variety of changes. Some simulation features, and some quality of life:
- Added gas mixtures / types.
- As a result the pressure sim is semi broken. A room of uniform pressure starts off stable, but changing the temperature or pressure by a small bit sets off the pressure sim and all gas moves to one side of the room. There is still a direction bias on gas flow. I'll aim to fix both of these as I experiment with different ways to sim gas flow.
- Added options to activate 2-step atmos sim, and visual smoothing of the pressure overlay. Also added an option to skip tiles in the pressure sim which makes the atmos sim slightly more stable in 2-step mode.
- The 2 step sim has no direction bias but is too chaotic and doesn't flow in a reasonable manner, I left it so people could play around with the values.
- Added heat simulation, still needs some tweaks. Heat flow only occurs through gas of a sufficient amount and walls.
- There is now a definitions folder, which describes each of the gases, tiles, and gas mixtures.
- You can now click and drag with mouse controls.
- Added heat controls for mouse. See help menu (F1 to open).
- Added description for each render mode in the top left overlay.
- Many other small things I've forgotten.
0.02 Download (Windows 64bit)Adding mixtures broke the heat and pressure sims initially, and though I managed to fix many of the bugs from that there is still some oddness. So let me know if you see anything that doesn't seem right. The pressure sim is still broken so expect to see that behave oddly.
The latter looks a bit 'cellular automata'y. Too much alone, it dies (spreads to empty neighbours, which, not being too much, 'picks up' new life if there's enough previous 'live' neighbours.)
As an experiment, what if you do the latter but 'smudge' the amounts for display. Part-tone (or some other proxy) each 'display cell' according to sum of gas in self plus immediate neighbours.
Alternately, keep the display the 'same', but underlie it with half-sized/quarter-areaed (or third/ninth?) simulation cells, to a similar (though subtly different) end result.
It increases your memory requirements for the base sim (compared with the visible array, or blockify the interface w.r.t. the same back-end - not including if you relied upon the peek'n'poke of the visual array and pressure array to be 'the same thing', already) but it might produce more (NPI!) fluid results. Or not. That's just my instincts, and could be wrong
I tried averaging pressure (that's what you meant with "part-tone"?) both visually only and then also affecting the grid values. When I tried averaging pressure values across the grid I ended up with buggy behavior so I left it out for now (probably a conservation of mass issue, it was a quick test). I left in the visual only option as it can make the 2-step sim option look less chaotic. I also added in an option to skip tiles in the 2-step sim, so if it's set to 1 the sim should be skipping every other tile. Setting it to 1 makes the 2-step sim less chaotic, anything above that seemingly does nothing different. I haven't tried breaking the grid down into smaller cells yet. One problem I could see with that is that it would increase performance requirements since it would be equivalent to increasing the grid size if I understood what you meant.
Edit: I shortened up the initial post and updated the download link. I put the original post into a spoiler. Also, note that the property values for the gases and tiles are temporary. I'll tweak them to be more meaningful or accurate in the future. Also, I disabled logging for this release. All it did was fill a text file with useless info, and could grow quite large after many uses. Should have a better logging system next release.