Stationeers

The Airflow Update

Atmospheric Simulation


Today we’re going to go into detail about the atmospheric simulation in Stationeers. We’ll give a short walkthrough about how we identify issues, think of solutions, test and iterate until we’ve solved problems or added new features. Specifically World Atmospheres, and how they move gas throughout the game, and especially how fast vacuums form.

Of the many complex systems Stationeers models, the atmospherics simulation is the most defining. Two times per second; pumps move gas, filters split compositions, pipes check for bursting, and much much more. A lot of the gas the player interacts with comes from the world, or ends being vented there. Unfortunately, the speed to pull a vacuum in world has always been one of the largest bottlenecks for Stationeers.



Table of times of original vacuum times









6 Tile Airlock Test 100kPa to 10kPa* 10kPa to 1kPa 100Pa 10Pa 1Pa
Legacy Code 28s 18s 37s 1m32s2m05s








Medium Room (5x5x5) Test 100kPa to 10kPa* 10kPa to 1kPa 100Pa 10Pa 1Pa
Legacy Code 10m 3m10s 6m45s 10m15s13m45s

*The initial 100kPa to 10kPa time is solely driven by the active vent speed, and this is not summed into the proceeding columns.
These tables demonstrate the power of the active vent. 90% of the air can be pulled rather quickly, but as soon as the World Atmosphere hits the vacuum floor, removing the remaining 10% of the air can take 200%-400% more time than the original 90%.

Twice per second, every World Atmosphere in the game mixes with its neighbors. In world atmospheres, are large 2m*2m*2m cubes containing 8000 liters of gas, and do a multistep job of equalizing itself and any of its 6 neighbors every half a second. This has worked well for distributing air around in the game, but has its limitations, when one tile is being vacuumed.

Even if one tile was very low pressure compared to its neighbor, the high pressure tile would still take a tiny part of the low pressure tile for itself. In very low pressure situations, this effect was significant. So what happens if we pick a fixed value, and say tiles cant take from smaller than 80%, and also wont give to tiles bigger than 120%. Not only might this speed up vacuum mixing, but it would also allow high pressure flows, to keep low pressure gasses from mixing upstream, a bonus feature.



Comparison with First Attempt












6 Tile Airlock Test 10kPa 1kPa 100Pa 10Pa 1Pa
Legacy Code 18s 37s 1m32s 2m05s
Attempt 1 (No upstream mixing) 6s 13s 22s 30s











Medium Room (5x5x5) Test 10kPa 1kPa 100Pa 10Pa 1Pa
Legacy Code 3m10s 6m45s 10m15s 13m45s
Attempt 1 (No upstream mixing) 2m10s 4m45s 7m15s 9m45s
In a 6 tile large airlock, the vacuum stage of cycling performance is 300% better, and in our large room its 40%. The large room doesn't see as much of a time decrease, because that amount of air is just able to keep the vent more saturated, but at 4 minutes faster, it's still a huge improvement.

However, with our over simplification of the problem, and first attempt at a solution, we’ve introduced a slight issue. Since the taking, or giving of air, isnt just the comparison of two atmospheres, but instead 6, we can find ourselves in a situation where all the higher pressure atmospheres give us a portion of their air, and we end up being higher pressure than any single one of the atmospheres. Then the next tick, the situation has reversed, and the air exclusively moves away. This mass rebounding would only happen in certain setups/configurations, but created a vortex of death when it did.



So, lets add some math to reduce the mixing amount so no single tick can make an atmosphere overshoot its neighbor’s pressure and see what happens.

Comparison with Second Attempt















6 Tile Airlock Test 10kPa 1kPa 100Pa 10Pa 1Pa
Legacy Code 18s 37s 1m32s 2m05s
Attempt 1 (No upstream mixing) 6s 13s 22s 30s
Attempt 2 (Fixed 14% mixing limit) 15s 31s 47s 1m3s














Medium Room (5x5x5) Test 10kPa 1kPa 100Pa 10Pa 1Pa
Legacy Code 3m10s 6m45s 10m15s 13m45s
Attempt 1 (No upstream mixing) 2m10s 4m45s 7m15s 9m45s
Attempt 2 (Fixed 14% mixing limit) 2m30s 5m25s 8m20s 11m15s

This fix addresses the problem while maintaining no up-pressure mixing, but directly counters our biggest desire to have vacuums pull faster.

Compromising on the first theorized ‘solution’ of eliminating backwards mixing to speed up vacuums. What if we still take large portions, but scale it based on how many neighbors, and change the 20% bigger/smaller take limits, into linear interpolations, where we just start scaling and taking/giving less, instead of taking none/all.

Comparison with Third Attempt












6 Tile Airlock Test 10kPa 100kPa to 10kPa 10kPa to 1kPa 100Pa 10Pa 1Pa
Legacy Code 28s 18s 37s 1m32s 2m05s
Attempt 3 (1/open+1) 27s 7s 15s 24s 31s











Medium Room (5x5x5) Test 10kPa 100kPa to 10kPa 10kPa to 1kPa 100Pa 10Pa 1Pa
Legacy Code 10m 3m10s 6m45s 10m15s 13m45s
Attempt 3 (1/open+1) 9m 30s 2m16s 5m 7m40s 10m10s

This third attempt nearly has the speed of our first attempt, while fixing issues with bouncing pressure waves.

So while our test case mainly focused on pulling vacuums, these changes dictate the general movement speed of gas even when in a sealed hallway. Gas leaks spreading through your base, holes exposing your atmosphere to the outside, or any other period of high pressure differential, should feel more significant, and happen quicker.

While our solution didnt fully prevent ‘up pressure’ mixing, many situations, such as accidentally opening a window on europa, now behave in a much more expected manner. Very little cold air will leak in while your nice base air blows outwards, but as soon as the wind dies down from the dropping pressure, the ice europa air will overtake the room.

Hopefully you’ve enjoyed this peak into just one portion of the many simulations we need to constantly run to keep your stations ticking. Revisiting core functionality can be risky as we could suddenly break everyone’s bases, but when we have clear goals, and reference points to aim for, this is the sort of careful approach we like to take.

And by the way, we recently added two new devices to the game, the powered vent, and large powered vent. These vents are allowed to traverse neighbor atmospheres when pulling a vacuum to do so even quicker. At the low pressures we’ve been talking about in the test data, they pull vacuums in a matter of seconds. But even in a fully pressurized room, they are 2x, and 4x the strength of a standard active vent, and can evacuate large amounts of gas very quickly.

Large Powered Vent Test









6 Tile Airlock Test 100kPa to 0kPa
1 Large powered vent 8s








Medium Room (5x5x5) Test 100kPa to 0kPa
1 Large powered vent 2m40s

Counterflow Heat Exchanger


The counterflow heat exchnager was not ready in time to be released with the other new heat exchangers but is finally ready! By drawing down the pressure of the outputs with a pump or regulator and regulating input pressures, the temperatures of two counter flowing networks can be effectively exchanged. Balancing the throughput of both inputs is key to creating a good exchange of temperatures.


New Powered Bench Variants


Four new powered bench variants have been added to give you more options when building your various rooms in your base and give you more variety.


Artwork Wallpaper



[expand type=Click to reveal a wallpaper version of this weeks wonderful patch artwork][/expand]



We need you!


Stationeers is a small niche project. We know times are tough and our project isn't for everyone. So if you like the work we do, we would love to encourage you to spread the word, grab our supporter DLCs, and watch Stationeers content creators on places like twitch and youtube. We want to keep developing this game for many years, well beyond any early access release and to do this we need your support


https://store.steampowered.com/app/2089290/Stationeers_Human_Cosmetics_Pack/

https://store.steampowered.com/app/1038400/Stationeers_Zrilian_Species_Pack/

https://store.steampowered.com/app/1038500/Stationeers_HEM_Droid_Species_Pack/

Change Log v0.2.4294.19984


We do not filter or redact our patch notes so these patch notes include work we are doing on the rockets that are not yet available in the game.

  • Updated suit and helmet for main menu scene and character customization scene
  • Fixed spelling errors in new heat exchanger descriptions
  • Updated uvs and textures for hardsuit
  • Fixed spelling mistake in character customization menu
  • Fixed spelling mistake for heat exchanger kit
  • Fixed fan blade direction not representing the flow of gas for the Powered Vent
  • Fixed wall heater color not changing when turned on
  • Added input blocker to pause menu to stop in-world screens from being interactable while paused
  • Fixed inconsistent naming for pipes and pipe kits
  • Fixed incorrectly sized collider on low volume pipe kits
  • Improved behaviour of PassthroughHeatExchanger. Now implements a crossflow behaviour where-by it is possible to have the two inputs come close to swapping temperatures.
  • Added RemoveToEqualize to AtmosphereHelper.cs This calculates the amount of gas required to Equalize input pressure with output pressure, removes it from the input and returns it for further calculations.
  • Refactored MoveToEqualize to call RemoveToEqualise.
  • Renamed AtmosphericsManager.TickSpeedMs to AtmosphericsManager.TickSpeedSeconds as this was what it was actually returning.
  • Changed Heat Exchangers to show energy exchanged each tick in kJ.
  • Fixed AtmosAnalyser only runs analysis code when held in hand of local player.
  • Changed Moved AtmosAnalyser value generation to main thread to prevent flickering values, it now reads the cached values.
  • Improved tooltips around spray gun fail states
  • Added new models for small tanks. This is purely an aesthetic change. No change to functionality.
  • Fixed wind turbines being functional inside frames
  • Fixed issue with re-connecting after a client disconnects. The disconnected client no longer needs to restart the game before reconnecting
  • Optimised PassthroughHeatExchanger simulation function.
  • Fixed Gas Mixer tooltip rounds Setting wheel to whole number, now shows decimal places.
  • Tweaked mesh for basic suit helmet
  • Fixed insulated tanks being offset incorrectly after model update.
  • Added bobble heads for future content
  • Restructured Gasses Mixing in world, to allow better flow control. Gasses in world now will move towards lower pressure areas faster, with speeds to pull vacuums with normal active vents increased by 300% in best cases, and 150% in more typical large rooms. The amount of gas which 'moves' up pressure gradients has been reduced, reducing the amount of 'reverse gas spread' happening between large pressure differential world grids. Gas spreading in narrow tunnels will also see an increase in movement.
  • reverting wind(Direction vector) calculations to previous state, to address downwards wind on pressureized planets. Atmospheres will still mix according to new mixing rules.
  • Added prototype assets and behaviour for rocket datalink logic devices.
  • Changed separated Data and power device dirty process for cable networks.
  • Removed un-needed process in RecalculateDeviceListSorted Function.
  • Removed un-necessary step in GetNextValidThing function.
  • Fixed Null-collider in broken build-state of arc furnace.
  • Fixed mix in world wind calculations not using a cached pressure value, causing wind coming from global atmospheres to be incorrectly strong.
  • Fixed unusually strong wind when mining on Venus, as wind strength should now scale with volume extracted.
  • Fixed small insulated tank blueprints
  • changed datastructure for atmospheric mixing data caching to reduce garbage creation.
  • Fixed face mounted structure placement placing on the wrong side of the supporting structure if the player was standing on it.
  • Added 1st pass of rocket location data authoring system.
  • Tweaked overalls mesh rig
  • Added WIP placeholder launch pad pieces
  • Refactored landing pad networks to allow for a generic modular structure and added the launchpad structure using it
  • Improvements to Rocket Location data authoring.
  • Added Concept of space map to rocket location data.
  • Added Data validation and error logging to rocket data location parsing.
  • Added Instanced classes for rocket locations.
  • fixed issue where close to global atmospheres could flicker their neighbours into existence every other tick,due to not caching atmos state prior to attempting to mix in world, causing memory issues.
  • A mixing atmosphere will spark its neighbours if it is ignited, which should cause more flash fires, instead of slow isolated flames in one tile.
  • Fixed a number of devices instancing new materials every-time their anim state changed.
  • Zrillian lungs now have a wider safe temperature range, and dont take damage between -20c to 80c, up from -10c to 50c of humans. Warnings remain unaffected, as the zrillians dont necessarily like these temperatures.
  • Added first pass on rocket control motherboard and ui
  • Added missing message factory changes
  • Renamed ReferencableHelper.cs to Referencable.cs
  • Added SpaceMap and SpaceMapNode data synchronisation to clients.
  • Added WIP code for Rocket travel between SpaceMap nodes.
  • Added IRocketPath and IRocketDestination Interfaces to handle leaving and returning to launch pad.
  • Disabled prototype launch animation.
  • Changed Mass to be a property. And implemented placeHolder mass values on rocket fuselage, pipes and inline tanks.
  • Added Method to get starting map to SpaceMap.cs
  • Added LaunchPadNetwork now caches its centre piece in the same way as LandingPadNetwork.
  • Updated rocket location icon
  • Fixed NRE from rocket.
  • Fixed Prototype LaunchPad prefabs
  • Added CounterFlow heat exchanger to tier two pipe bender. The counter-flow heat exchanger passes gas and liquids from the input to the corresponding output passively based on pressure differential (or volume ratio differential in the case of liquids). Matching the flow rate of both inputs will allow for around 70% efficiency of heat reclamation (this allow for the swapping of temperatures between to pipe networks. Multiple exchangers can be daisy chained together to increase the heat reclamation efficiency.
  • Updated WorldManager source prefabs in scene.
  • Fixed Pumps and other pipe devices changing color on load.
  • Removed Outline effect demo scripts.
  • Added first pass on star map ui for rockets
  • Added rocket can now path to orbit.
  • Changed all pipes can now be built in a fuselage
  • Fixed Stacking PureIce would zero out the spawn contents.
  • Added Logic variables to avionics Device.
  • Changed a number of single-grid atmos devices to be allowed to be built in rockets.
  • Added rocket command to print destination IDs.
  • Added support for dynamically created and destroyed SpaceMap nodes.
  • Changed Launch pads now generate a new node once they have a valid centre piece.
  • Fixed An uncommon crash when running the StateChange fix on a custom world save.
  • Added dynamic locations to map view (wip)
  • Fixed gas being created from spray cans being created with 0 energy
  • Reverted the ability to use a spray can to paint the object in the other hand as this behaviour is confusing and not communicated.
  • Portable generator no longer continues providing power once the canister runs out
  • Fixed the blueprint for the Hydroponics Station kit
  • added missing blueprint for automated hydroponics kit
  • Added Pathfinding algorithm so rocket can path to/from any destination on the space-map.
  • Added Pathfinding testing command for validating authored data.
  • Added Rocket movement logic has collection of Node-connections and can path through multiple nodes to reach target destination.
  • Fixed Some nodes being registered twice to the space-map.
  • Fixed some merge errors with map view
  • Fixed modular structure networks not registering devices correctly
  • Updated new rocket kits to be not spawnable
  • Fixed launchpads being registered as landing pad networks
  • Changed star map to use grid based panel for dynamic locations rather than a radial layout. The position of these can be authored in the xml to achieve a nice map layout
  • Fixed Some devices would allow interaction even when in a locked state or when the player didn't have the correct access card.
  • Fixed Some cases where things could be interacted with when destroyed or incomplete.
  • Added temporary method for rocket to link to a landing pad node
  • Fixed launch pad networks not being cleared when unloading
  • Fixed Device Locking fix prevented airlock cycling using door interaction panel.
  • Fixed Null reference exception on server when writing DynamicPanelData.
  • Fixed Can't interact with slots when device locked (beta only)
  • Fixed Settable Atmospheric devices show incorrect tooltip on setting wheel when locked.
  • Fixed launch pads not deregistering correctly on destroy
  • Fixed space map nodes not removing all their connections when deregistering
  • Added 4 new bench variants
  • Removed some temp images from rocket info canvas
  • Fixed incorrect calling placement of base.OnDestroy in LandingPadModular.
  • Fixed Pipe mounted LiquidDrain throws error when pipe removed.
  • Small Clean up of DevicePipeMounted code
  • Removed Prototype launchpad pieces from kit (LandingPadBasic)
  • Fixed A save with a Pad Network with no saved networkId would not load.
  • Changed UpdateThings on GameStart to run once gameState is set to running (this was the behaviour on clients, should also be behaviour on server)
  • Moved some classes into an appropriate namespace
  • Added temporary method to refresh rocket internals when you modify the rocket network
  • Added rocket refresh command to help with debugging rocket behaviour
  • Fixed rocket engines being registered multiple times in rocket network
  • Fixed TurbineGenerator Animation and sound not synced to clients.
  • Added Some WIP electrolysis code.
  • Fixed Unable to turn on/off light or flush locked helmet using interactable buttons (beta only).
  • Fixed MAX_ENERGY Constant being too low causing large tanks with too much liquid in them to have their contents deleted on load.
  • Fixed Incorrect serialisation type for network messages for Setting and Quantity of digital chute devices.
  • Added PlaceHolder Rocket Mining device.
  • Added OnFishedLoad call to StructureNetwork.
  • Fixed Rocket doesn't find launchpad on load.
  • Added hashing of Id to spaceMap node.
  • Implemented IRocketInternals on Chutes.
  • Removed prototype launchpad tower base from incorrect kit