Jump to content

Gas and liquid improvements


Recommended Posts

Gas suggestions:

  • Different gasses can be occupying the same space at the same time (To create a more realistic diffusion of gas.
    • Heavier gasses such as carbon dioxide may be lower and have a 80% carbon 20% oxygen rate while
    • Lighter gasses such as hydrogen would still be higher with a 80% hydrogen 20% oxygen
    • Uses more realistic numbers than just 80% and 20%...
    • Contaminated oxygen adds to a contaminated rating of the area around I.E: 70% toxic near the bathrooms then 60% then 50% while still occupying same space as other gasses
    • Pressure still affects the gas in an area
  • Gas tanks
    • Stores gas at higher than 2000 gram pressures
    • multi-block structure or place-able tank (or both)
    • leaks gas when pressure too high (above 10-30Kg?)
  • Gas pumps
    • Actually pulls gas towards it at a low rate
    • Slightly higher power use to balance this?

Liquid suggestions:

  • different liquids can be occupying the same space
    • Same sort of system as above
    • Heavier liquids will fill half a tile (just for visual not affecting liquids
    • Liquid contaminants are throughout the entire liquid increasing its toxicity rate
    • Toxic liquids used in food cause disease
  • Drinks
    • Need for water to drink
    • Can be drunk straight from source
    • carbonated water
      • Can be used in machine to make soda
    • Juices from combining plants and water
Link to comment
Share on other sites

As already discussed in other locations: Yes please, it would make sense and things easier. The current system dosn't make much, as one tile of (basically existing but not absolute, as a very little gas is needed to 'fill' the tile) vacuum can exist in the middle of >2k tiles of another gas.

Link to comment
Share on other sites

I agree with the general idea but not the implementation.  I would like a more dynamic and adjustable approach for both gas and water systems.

Each tile would be able to contain all types of gases at different ratios to each other.  This is in respect to the overall pressure of gas or volume of liquid of that tile.

  • For example a high pressure tile could have 5% chlorine, 10% oxygen, 60% carbon, 25% hydrogen.
  • If the total pressure of that tile is 1000g it would mean it has 250g of hydrogen, 100g of oxygen etc.
  • The entire gas map checks and organizes which tiles have the lowest pressure and prioritize them for movement.
  • A certain percentage of pressure difference may be moved every number of seconds.
  • Those with the lowest pressures will then check the 8 neighbors around them for the highest pressure and those candidates then will push an amount of gas onto them.
  • Depending on position the appropriate gases are picked (if higher pressure is below the lower pressure, light gases are pushed like hydrogen, if vice versa carbon or contamination could be pushed instead).
  • If the hydrogen was pushed (let's say all 25% hydrogen of the tile mentioned above, then that value is adjusted down to 0%, other gas ratios of that tile recalculated to reflect the same volume they had for the newer lower pressure.
  • All 250grams are moved to the lower pressure tile, which has its pressure added up and new ratios recalculated.

The idea is that the specific gases will move around, and not the entire tile.

Now that's obviously excess detail and I'm sure there are more optimized ways of doing this in bulk using buffers and such.  But I find this approach to be much more interesting than what we currently have if it can be implemented in an optimized fashion.

Link to comment
Share on other sites

 

10 hours ago, Luponius said:

I agree with the general idea but not the implementation.  I would like a more dynamic and adjustable approach for both gas and water systems.

Each tile would be able to contain all types of gases at different ratios to each other.  This is in respect to the overall pressure of gas or volume of liquid of that tile.

  • For example a high pressure tile could have 5% chlorine, 10% oxygen, 60% carbon, 25% hydrogen.
  • If the total pressure of that tile is 1000g it would mean it has 250g of hydrogen, 100g of oxygen etc.
  • The entire gas map checks and organizes which tiles have the lowest pressure and prioritize them for movement.
  • A certain percentage of pressure difference may be moved every number of seconds.
  • Those with the lowest pressures will then check the 8 neighbors around them for the highest pressure and those candidates then will push an amount of gas onto them.
  • Depending on position the appropriate gases are picked (if higher pressure is below the lower pressure, light gases are pushed like hydrogen, if vice versa carbon or contamination could be pushed instead).
  • If the hydrogen was pushed (let's say all 25% hydrogen of the tile mentioned above, then that value is adjusted down to 0%, other gas ratios of that tile recalculated to reflect the same volume they had for the newer lower pressure.
  • All 250grams are moved to the lower pressure tile, which has its pressure added up and new ratios recalculated.

The idea is that the specific gases will move around, and not the entire tile.

Now that's obviously excess detail and I'm sure there are more optimized ways of doing this in bulk using buffers and such.  But I find this approach to be much more interesting than what we currently have if it can be implemented in an optimized fashion.

This is generically what I had in mind and a good idea. My point was that the game should use values for types of gasses in the game rather than individual gasses themselves. The way I wrote my post hints at it but for future reference this is generally what I meant.

 

Link to comment
Share on other sites

8 hours ago, Kruleworld said:

wouldn't mixing of gases make things complex for pumping, sorting and 'demixing'?

Most likely it would make it just as complex as it already is, but it's behavior should become more predictable.  What might be more complex is its technical implementation.  Then again I think they're relying on some sort of a physics engine for both gases and liquids, which is most likely the most complex way to go about it that there is, the upside being there can be interesting outcomes from it.  Downside of course it can be unpredictable and frustrating for players when it gets some dodgy results.

Link to comment
Share on other sites

17 hours ago, Kruleworld said:

wouldn't mixing of gases make things complex for pumping, sorting and 'demixing'?

Pumping of gasses would remain the same/similar due to the game already having a gas pump and gas sorter. The only real need for major de-mixing facilities is if you want 5 different storage tanks for each dedicated gas, and even then this method makes that easier as well since gas would be more readily available for pumps. I do believe in general as said by Luponius the gas would overall be more complex as a whole to program and manage because the way they have it programmed into the game currently will be harder to change, however I believe the overall good changes of this system would outweigh the the more complex pumping. 

From a programming standpoint I believe that this won't be changed since most of the game's mechanics are based off of the current gas/water system and therefore the gas and water system will remain with other developments being made to counter their wonky physics.

Link to comment
Share on other sites

11 hours ago, rdrazga said:

From a programming standpoint I believe that this won't be changed since most of the game's mechanics are based off of the current gas/water system and therefore the gas and water system will remain with other developments being made to counter their wonky physics.

Yeah I share this view on the situation.  Considering the game is named as such, they probably had the gas and liquid system as their foundation for the game.  I don't mind that at all, if the current system can be polished as the game slowly progresses, the end result might be for the better :)

Link to comment
Share on other sites

I'm not sure what system they are using right now for their diffusion, but I would suspect it's something like COMSOL.  The gist of it is that you calculate diffusion rates for each border of a cell, and let the gases/liquids flow that way.  In this way, you're only ever dealing with the 1D version of the Diffusion Equation and Heat Equation.  Solving these equations (depending on the numerical method you use) already takes a lot of processing power on their own.  They probably dumbed it down, because simulation like that (on this scale) takes an exorbitant amount of processing power, especially when you have liquid, gas, and heat going at the same time.

The problem with allowing multiple gases/liquids to occupy the same cell is that now you have added changes in cell density and the equations become that much more difficult to solve.  I'm surprised ONI runs as smoothly as it does already, because the physics required to run an accurate simulation of fluid mechanics like this is really complex.

Edit: To get an idea of how much background math ONI might be using already, you would need to solve:

  1. The Navier-Stokes Equations for fluid flow
  2. The Heat Equation for diffusion/transfer of heat

For every cell edge.  That is a lot of math.

Link to comment
Share on other sites

12 hours ago, enhander23 said:

I'm not sure what system they are using right now for their diffusion, but I would suspect it's something like COMSOL.  The gist of it is that you calculate diffusion rates for each border of a cell, and let the gases/liquids flow that way.  In this way, you're only ever dealing with the 1D version of the Diffusion Equation and Heat Equation.  Solving these equations (depending on the numerical method you use) already takes a lot of processing power on their own.  They probably dumbed it down, because simulation like that (on this scale) takes an exorbitant amount of processing power, especially when you have liquid, gas, and heat going at the same time.

The problem with allowing multiple gases/liquids to occupy the same cell is that now you have added changes in cell density and the equations become that much more difficult to solve.  I'm surprised ONI runs as smoothly as it does already, because the physics required to run an accurate simulation of fluid mechanics like this is really complex.

Edit: To get an idea of how much background math ONI might be using already, you would need to solve:

  1. The Navier-Stokes Equations for fluid flow
  2. The Heat Equation for diffusion/transfer of heat

For every cell edge.  That is a lot of math.

Yes but when your dealing with computers that have 2-4 brains in the cpu, are made for specifically solving complex math equations, ect you see why the game runs smoothly. On an older system this game would die, bury itself, and burn its buried body with lag. Anyways your point is most likely why gas spreads as slowly as it does and has odd behaviors near water and other gasses. I do however thing modern and even some older computers can handle the game with more complex equations, but like I said before, The amount of programming to implement this would be extremely large.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...