Toggle UI Functioning, Minor Bugs

Hey Folks! I finally got the toggle UI functional! After several days of writing code I'm not sure I understand anymore, I was able to setup this really basic example:

IMAGE(http://bluebottlegames.com/img/screenshots/screenshot-2016-09-07.png)

Toggle panel setup for two airlocks.

In the above pic, the right side shows the ship layout, and the left side shows the Toggle UI.

The ship is little more than the bare minimum to test remote opening and closing of airlocks. It has one "fore" airlock (top), and one "aft." The Toggle controls are barely visible as some dots on the wall behind Bedford. Yellow conduit runs from the controls to the aft airlock, and red to the fore.

On the left, the control panel is on the top, and its inner wiring on the bottom. The various toggles have labels and are currently set to "OFF" (closed). Inside, there are a pair of input screws for each toggle. And each screw takes a pair of data: the remote object to control, and the interaction to perform on it. So the first two screws are the on and off for the airlock connected by yellow, and the next two are the same for the red. The last four inputs are not hooked-up.

Also, in this screen the user can change the labels over each switch. Just click the text and type.

Once the wiring and naming is finished, the user clicks "Done" and the panel returns to the switches and labels view. And all of this is overlaid on the screen, covering the ship while active. There's a separate button to close the UI and return to managing the crew.

The exciting part, though, is that I could flip those two toggles, close the UI panel, and watch as remote airlocks opened one by one. Sort of a happy coincidence they did so sequentially, as the toggle has its own interaction queue to go through while opening them. I may have to change it to be instant so the player can change the ship without having to close the UI and wait for changes to happen, then reopen the UI to continue making changes.

Anyway, it was a cool feeling seeing this work after all this coding. It's really getting messy in there, and I'll probably need to spruce it up a bit to at least make it more maintainable/extensible. But for now, I can hook up switches to remote things!

Comments

Malacodor's picture
Malacodor

After several days of writing code I'm not sure I understand anymore, ...

At that point I gave up programming.

Ran around with a clown mask before it was cool

dcfedor's picture
dcfedor

Yeah, it can really do a number on my motivation, too. These days, I have to really struggle to keep plugging away.

I think game development is a lot of fun when the tasks are novel and the solution is clear, but it can also be really tedious and unrewarding if you're deep in the woods. Especially if you're still unsure if the game will even work as intended.

It's a neat idea I have in my head, but I find myself questioning if it can live up to that vision. I'm not giving up yet, though!

Dan Fedor - Founder, Blue Bottle Games