Atmosphere Simulation
I am beginning to work on the atmosphere simulation. Before I go any further I just want to know what level of fidelity we want in the simulation. One way which would be less accurate is partitioning the tile collection into rooms and having a set of properties describing the gases in each of these rooms. Another way would be to simulate the transfer of gases between adjacent tiles simulating more fluid-like dynamics. Which do you all think is better for this project?
Uhm, are you starting atmos from scratch?
There used to be an atmos system but it was removed when a proper tile grid was implemented, you should try to bring that back.
I like the latter.
I have defined IAtmosphere and IMapAtmosphere. A good way to imagine an atmosphere is a node within a graph. The edges that connect these nodes represent channels for the gases to transfer. Depending on the pressure difference and the cross-sectional area of the channel a volume of air will transfer between the nodes.
I currently have a simple MapAtmosphere that provides a global atmosphere for the whole map. Player entities just need to query the atmosphere at their location and they can get the statistics about the air. I plan to add a LungAtmosphere that will simulate the behavior of a human's lungs.
I think this implementation is best because it can be expanded into so many parts of the game. Anything that deals with gases can implement IAtmosphere and work with everything else. For example a pump could have members in and out which are of type IAtmosphere. Internally the Pump can extract volumes of air from the in and mix them into the out to create a pressure difference between in and out.
Let me know what you guys think.
There used to be an atmos system but it was removed when a proper tile grid was implemented, you should try to bring that back.
That's what I think.
It looks like the only difference between my code and the code from 2011 is that mine is more abstract and is missing gas velocity. I have some ideas on how to implement it though. I will begin rewriting the commented code inside HumanHealthComponent to work with the new IMapAtmosphere
Also, do we really want to send atmosphere information over the network? I think we should keep all of that server-side.
I would say keep it server side unless the client requests it or if it damages the player(just send what's causing the damage, no exact amounts needed). The client could request it when doing an atmospheric scanner or something like that.
The only reason atmos data was being sent to the client is so that toxins would be visible like in ss13 byond.
Ostaf made some changes in either 2012 or 2011, I can't remember. Atmos worked a LOT better before those changes. Take a look at GasPropagationTest for a demo of how it used to work.
The old model did a good job of simulating vortices and gas velocity and pressure oscillations. It was total bullshit math but it looked real nice and acted sort of like real gas.
Just posted about some atmospherics in reddit, then came over here to check out what's already made and noticed this post. I would love to see how you are implementing atmospherics, as I am a beginner to coding and am not sure what others would think about what I have.
-Edit-
Just realized that I am coding in c++ while you are coding in c#
Atm or Kpa?
kPa, duh
Nick's code had some Atm so I was confused for a min
It doesn't use any specific units at the moment. The units/constants in the system will be specified later to minimize floating point precision errors and to best match real air behavior.
On Sat, May 14, 2016 at 1:16 PM, James A Blake [email protected] wrote:
Nick's code had some Atm so I was confused for a min
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/space-wizards/space-station-14/issues/58#issuecomment-219232110
Have you guys considered fixing the old atmos system because it looked great.
Which one/where is it?
https://github.com/space-wizards/space-station-14/tree/master/POCs/GasPropagationTest
Look at the git history for how it used to be implemented.