UI Work

Hey Folks! Continuing the theme of yesterday's work in making the new game on-boarding smoother, I decided to work on some UI elements today.

While testing yesterday, I noticed the jobs menu (used to paint construction jobs) wasn't having any effect on a derelict. So I did some poking around. And weirdly, it worked fine on the chargen station. I couldn't find any problems that would lead to that buggy behavior. But I did manage to find a null pointer bug if one canceled out of the job UI over an empty tile, so I fixed that.

I did learn a bit more about how they work, though. And while I was in there, I finally fixed the broken debug UI overlay. There were some mismatched booleans due to my poor variable naming, so I cleared that up.

Not having any luck reproducing that bug, I decided to also take a look at the notifications UI (seen in today's image). Michael setup a little objective reminder UI widget you can click to see outstanding goals you have. And right now, it guides you through important chargen steps, plus warns you of pressure loss in any rooms.

It's pretty handy! Especially now that we're starting to let users test the game.

It still has some unfinished features, though. Michael laid a lot of ground work for it to do more (location-specific info, updating the list, etc.). It also seems to reset even if you load a save file, which makes some of the objectives invalid.

So I decided to dive in there and see if I could learn how it works, fix that reload issue, and add more to it.

I ended up creating a prefab for the UI so I could muck with the layout visually in the editor. And that required a few changes to it's constructor. I also decided to change the way objectives store data a bit. I want to see if I can make them all rely on two things: the target object, and a trigger test that must pass to clear the objective.

So far, I've been able to get the homeworld, career, and launch UIs to each have their objectives set this way. I'll check on the room pressure sensor next. I also moved these objectives into code blocks so that they only trigger for new characters, not on save file reload.

Also, I changed the plain text list of objectives to be a list of buttons. I'm hoping I can use those, along with the stored info on the relevant target, so that when the user clicks, the camera focuses on that object.

Assuming I didn't blow things up with these changes, I should be able to add some objectives of my own. And hopefully start directing new users to pay more attention to it!

Tags: Ostranauts