N2 and O2 Both Working, but Conduit Issues

Hey Folks! Hope everyone enjoyed their weekend. The weather here's been pretty great recently, so we actually visited the beach! Felt good to get outside after a long, wet/cool winter.

Back at work, I unfortunately had a bunch of admin work to take care of before I could get back to code. The usual monthly tax stuff, filing returns, paying bills. Plus a handful of email inquiries. But once that was done, it was back to work!

I finally got both the O2 and N2 sensor/pump combos working. In the end, I removed the old Red/Green alarm and made bespoke N2 and O2 alarms to avoid confusion. And I had to create a series of new interactions, triggers, and other bits to get them working. (I still had the N2 sensor using the O2 data, so it was incorrectly changing modes.)

The feeling of victory was brief, however. Once I tried to transplant the alarm/pump stuff from the smaller character generation station to a larger ship, things started failing.

For one thing, I couldn't get the pumps to see the alarms without a lot of deleting and re-adding of conduits. I had forgotten which pieces communicated signals to adjacent tiles, and which were just pass-throughs. So I had to do a lot of trial and error to get signals going to the right places.

To make matters worse, the signal info wouldn't update unless I reloaded the ship. This is likely easy to fix, but was an annoyance.

Furthermore, once I did get things hooked up, there was a problem with too many signals sharing the same conduits. I had them setup such that there were two conduit types (yellow and green) and two detector types (N2 and O2). But when the pump showed me the UI to choose the connected alarm, I only got the N2 alarm twice: once on each conduit. I think my code assumes there is only one item on each signal line, so it doesn't bother showing me others.

All in all, I felt kind of deflated at this point. The conduits failed. The UI failed. And last week's work involved a lot of failing. Making new stuff is really confusing, flaky, and I'm pretty sure nobody is going to want to jump through all these hoops I can barely figure out myself. Progress is going so damned slow, I barely have it in me to keep plugging away at it.

I might have to rip out some of this stuff and replace it with better systems. I might have to start looking at this as a collection of hardened, bespoke systems that interoperate, instead of pliable, multi-use systems that can be endlessly reconfigured.

To that end, I'm taking a slight detour to try a different approach with conduits. Namely, nuking conduits entirely. Instead, I'm going to try a thing where you click an item, open the UI for it, then click the input you want to hook-up. Then, it hides the UI, highlights all compatible items on the ship, and gives you a rubber-band cursor to connect the current item to some other item. Just point-and-click the connection you want, visually.

The one good thing about all this is that after a year or two of fumbling through Unity, I'm starting to learn some useful tricks. The fact that I can draw a UI line on screen is relatively new. The reason for the old convoluted conduit system was because I didn't know how else to do it. Now, I can do some more intuitive, visual things like that. So maybe it'll be better for it in the long run?

Assuming I don't run out of steam (or funds) before I get there :)

Tags: Ostranauts

Comments

matsy's picture
matsy

I think for more intricate stuff like the hooking up of items the idea of virtual wires is probably the more manageable way to go if you think about all the systems a ship will have.

Then it maybe worth having a main power condiute from the source which those virtual wires tag into so you will have the idea of the condiute getting broken and items before or after it breaking down.

Prison Architecture does this for when using CCTV and other stuff if I remember correctly. Maybe worth seeing how they let you zip tie certain cables together etc.

I wouldn't get your head down too much. Sometimes this is the issue with iterative development. Somethings that sound cool just doesn't work unfortunately. But it sounds like you've figured out a better idea.

dcfedor's picture
dcfedor

Yeah, I'm already thinking the Prison Architect power grid is a better way to go than what I have. I.e. main power conduits supply power to a radius, except for high-power appliances that need direct hook-up.

The signal stuff I only barely got into when playing PA, though. (Phone taps, if I recall.) Maybe I'll have to fire that up again.

I think the only benefits to the old way are the damage modeling you mention, and aesthetics.

I kept telling myself it'd be cool to have to repair or reroute signal/power around a damaged area, but I don't actually know if that's true. I'd have to test it to know, either way.

The aesthetic bit is just that familiar sci-fi tends to have cables running down corridors and along floors. And grid-aligned stuff looks a bit more intentional than diagonal lines criss-crossing.

But maybe I should worry about it being fun and intuitive first :)

Dan Fedor - Founder, Blue Bottle Games