Power Overlay

Hey Folks! Hope everyone had a good weekend. Not much noteworthy to report here, though the Steam Halloween sale has started, so if you're somehow reading this and still don't own the game, it's 75% off!

Back at the office, I added some power overlay stuff today to help me debug the ship damage issues I saw last week. It seemed like conduits that were removed didn't cause appliances further down the line to switch off. And that some of the conduits unintuitively supplied power to items.

So that yellow lightning icon you see in today's screenshot was added to each tile that had power flowing through it. Anything seeking power in one of those tiles would get it. And it helped me trace the issue pretty quickly.

Basically, it came down to two things. First, I had originally setup my batteries and reactors to supply power to a tile outside of their footprint. Second, conduits conducted power to/from adjacent tiles in each cardinal direction.

Combining these two rules meant that destroying a conduit adjacent to the reactor/battery output didn't cut the supply, since nearby conduits could sample the output tile. Makes sense when you can see the dots come alive and disappear in real-time, but confusing without them.

So I think this tells me a few things:

First, this sort of power overlay should be a user-facing feature. It's a tool I find useful in debugging ships, so users will likely find it useful, too. I can spruce it up later to look pretty, and make it toggle on/off as desired. But it should stay.

Second, power generators/storage items should keep power within their footprint. Since conduits can grab power from adjacent tiles, this will be a bit more intuitive. Cut the line at the reactor's output, and you cut the circuit's power.

Third, I had some weird input points on my air pumps. They would sample tiles on either side of the main pump assembly, rather than the middle. I adjusted them to only have one input in the middle, so to power them, you just run a conduit right through the wall where they're installed. (In today's image, you can see a powered air pump attached to the green O2 canister, near the right door.)

Finally, while working on this, I noticed a bug in my lights that prevented them from switching off if they had no power. They simply lacked the "IsPowered" condition, which was a requirement for things to handle on/off power switching. Hooking that up means my damaged ships have dark, spooky areas now :)

Also, the lights revealed something else I should work on: highlighting items that need power but don't have it. Like in Sim City, when a building lacks power, there should be some icon to draw your attention. (At least, in cases where it is designated as "on" but cannot turn on due to power.) I already have this partially working, but want to align the warning icon with the actual tile missing power. That, and I need to fix a bug that causes the icon to disappear when the lights switch off.

Once this is done, I think we'll have a rough draft of pre-damaged ships ready for a salvage game loop. In testing this last week, I arrived at a derelict, donned my EVA suit, stepped into the airlock, and found myself wishing I could manually control its air pumps. I wanted to evacuate the airlock before walking onto the derelict, to avoid bleeding off a chunk of my atmo. The same could be said for heaters/coolers, in case you just want to manually override the thermostat.

And on that note, I've been meaning to add some manual controls to the fusion reactor. A big part of the game is going to be using diegetic UI to enhance immersion. E.g. the docking request and navigation console are a way to let the user feel like they control an actual ship. And in the case of the fusion reactor, it would be more immersive if you had to evacuate the fusion chamber, prime the laser containment capacitors, start the cryonic pumping, initiate fuel pellet feed, initiate lasing, then stabilize temperature/pressure, etc. Flipping switches, levers, monitoring readouts, etc. You know, nerding-out in your spaceship :) And importantly, a handy way to illustrate this facet of the gameplay in a trailer: realistic science and immersive UI.

I'll also eventually need to add some "uninstall item" commands the player can use to salvage equipment from a derelict. Something to make use of the tools I added a few weeks ago, and to generate income for the player. Plus, I suppose, a better-stocked shop from which to buy things...lots to do!

Tags: Ostranauts