Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Space station atmosphere simulator  (Read 1737 times)

Starver

  • Bay Watcher
    • View Profile
Re: Space station atmosphere simulator
« Reply #15 on: November 10, 2018, 12:26:44 pm »

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
Logged

moneyl

  • Bay Watcher
    • View Profile
Re: Space station atmosphere simulator
« Reply #16 on: November 16, 2018, 12:44:46 am »

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.
« Last Edit: November 16, 2018, 01:19:20 am by moneyl »
Logged

moneyl

  • Bay Watcher
    • View Profile
Re: Space station atmosphere simulator
« Reply #17 on: December 04, 2018, 09:15:20 pm »

I'll be tabling this for a few months or longer as I'm moving over to a modding project for another game. I usually cycle between projects every 4-6 months, so I will certainly come back to this. Once I have something worth showing on my other project I will post it in this forum. Hopefully in 3-5 weeks. Thanks again for the interest shown, I'm still happy to discuss this project even as I work on others.
Logged

Starver

  • Bay Watcher
    • View Profile
Re: Space station atmosphere simulator
« Reply #18 on: December 04, 2018, 09:52:09 pm »

I like what I've seen, and hope your modding project is as interesting to that other audience. Fare thee well, and don't forget to get back to this eventually, if you can still bare it.

I also wanted to post this: https://english.stackexchange.com/questions/96961/tabled-us-vs-uk
;)
Logged

moneyl

  • Bay Watcher
    • View Profile
Re: Space station atmosphere simulator
« Reply #19 on: December 08, 2018, 12:23:48 am »

I like what I've seen, and hope your modding project is as interesting to that other audience. Fare thee well, and don't forget to get back to this eventually, if you can still bare it.

I also wanted to post this: https://english.stackexchange.com/questions/96961/tabled-us-vs-uk
;)
Huh, that's pretty interesting. I've always used it in the manner commonly used in the US, though come to think of it the UK definition makes more sense to me. Since you are "putting it on the table" for consideration. I'll definitely come back to this project. I cycle to keep things interesting. I was actually working on this project last winter/spring as well. Just in a more primitive form while I was learning openGL. Then I had moved to a different project during the summer and back to this during this fall.
Logged
Pages: 1 [2]