Gas Fixes and Integrating Job System

Hey Folks! A bit more work on the gas exchange issues today, finding a bug in breathing, and integrating Michael's job system progress.

The gas exchange system had one more issue to resolve, and that was the way it calculated partial pressures. I was mistakenly erasing the partial pressure data, thinking the gas exchange equations would restore them with correct values in time later. However, it appears even this small gap allowed for weirdness in sensors to crop up (the sensor occasionally sampled the air during that zero partial pressure moment).

Instead, the correct approach was for me to just track the partial pressure deltas at the same time the actual gas exchanging was happening. Basically, don't be a lazy programmer, Dan :)

Once that was working, I started integrating Michael's latest job system stuff, to take a look. And you can see it in today's screenshot.

In the lower left there is a cluster of buttons that each open menus for assigning tasks to the crew. Currently, we have the build menu open, and the wall, floor, and conduit items are available. I think this only assigns uninstall tasks at the moment, but I'll have to check with Michael. Other tasks to be done via these menus include installing items, hauling, certain actions like repair or clean, and cancel job. Each of them works like a paintbrush that applies tasks to each tile you paint on.

On the lower right is another feature he's working on: the objectives UI. This is basically a notification icon that alerts you if you have important messages, and if you click it, you get a "to do" list similar to what you see here. E.g. there may be a room with a pressure alert, a job AI cannot reach, food stores might be getting low, or you may have character generation tasks remaining before you begin, etc.

Both of these are intended to make life easier for players, both with the on-boarding/tutorial process, and large-scale missions like gutting a derelict for parts.

Lastly, I started looking into a long-standing bug involving AI breathing. You may have noticed a lot of AI suffers hypoxia in situations where they shouldn't, and this appears to be a timer bug. The timer that controls their breathing gets out of sync with the timer that controls their O2 needs. And I think I've just found where it happens in the code at the end of the day today. So tomorrow I'll see if I can get that sorted out. Looks like it might just be a matter of using per-frame deltas when I should be just checking time passed since last update.

Tags: Ostranauts

Comments

ra1's picture
ra1

As a fellow programmer, I love it that you simulated actual breathing based on available O2 - at least you aren't simulating down to the atom level :)

dcfedor's picture
dcfedor

I do have a tendency to go down the rabbit hole on these things :)

And even then, there always seems to be yet another level of complexity the sim doesn't handle. Reality is just so darned complicated!

Dan Fedor - Founder, Blue Bottle Games