Week 3: Building Life Support

Building new mechanics is my favorite part of the process.

The main character holding the filter for an oxygen tank, pictured in the background, with orange outline showing where the filter should go.
Got yer filter! Got yer filter!

It's deeply satisfying watching planned systems come to life.

This week I implemented Running Late's oxygen system. Seeing the system evolve in front of me was exciting, even though I knew exactly what I was building. I'm sitting in my virtual cockpit, watching the cabin oxygen slowly tick down until I hear the beep of an alarm and the check systems light comes on. Finally, I have a gameplay mechanic instead of just a bunch of pretty assets.

The Oxygen Loop

The life support system works exactly like you'd expect on a spacecraft of questionable durability. Oxygen filters process cabin air and generate breathable atmosphere—when they're clean. After enough usage, the filters accumulate grime and lose efficiency. Replacing filters is super easy, until you're in the middle of a lightning storm trying to remember where the spares even are.

The left side of the cabin, with a footlocker, on the top of which rests a spare filter.
Where did I put that thing?

The tanks generate oxygen when they have filters, but generating oxygen uses up the filters. Which means, the player needs a way to see that the situation is worsening.

Making Degradation Visible

Providing visual feedback around the filter states was satisfying. Clean filters look pristine and black. As they degrade, they visually accumulate dirt and grime until they're completely clogged with gray, fuzzy buildup. I'm using dynamic materials to blend between clean and dirty textures based on the filter's condition.

Side-by-side of two air filters, the left one clean and the right one dirty.
Left: Clean, Right: Dirty

I will probably have to address overall lighting, as right now it might not be possible to make out the filter states without removing them from the tanks and taking them to a better-lit part of the cabin. But for now, it's a cool effect you can actually see in the game.

Systems Architecture

Under the hood, I built some architecture that I'm going to use in future systems. I created a way for all ship systems to talk to a central controller that manages everything on a timer. Every 30 seconds, the controller lowers the oxygen in the cabin, then asks each system to update itself. The oxygen tanks check their filters, generate appropriate amounts of oxygen, and degrade their components slightly. Then the controller looks at the remaining oxygen levels and determines if it needs to turn on the check systems light.

This approach means, when I add new systems (power, navigation, hull integrity), they have an immediate integration with this update process. The controller doesn't care what kind of system it's talking to. It just asks everything to update and the systems handle their own logic.

Systems Check

Eventually, all the systems will report in with the system management console, where additional gameplay will happen. I downloaded a light asset, pushed it into the console, and basically created a light that flips from green to red when oxygen gets low. When I pulled the filters and let the system run long enough, it was genuinely exciting to see the red eye of doom.

The status console with the check systems light glowing softly red, indicating things are bad.
Why is the computer mad at me?

This is the first moment where there's an actual mechanic in the game, instead of just a static environment I can walk around. It feels like a milestone of sorts.

Building Forward

Week 3 established the foundation for future systems. Power is next, and then nav and engines. This update timer is the heartbeat of the game.

But next up is building a flashlight, for when the power fails.