Builder Inspector – BB – Update 9

close upBuilder Inspector – BB – Update 9close up

Posted: January 13, 2025

Last Updated: January 13, 2025

Builder Inspector – BB – Update 9

Timeframe: January 2, 2025 – January 13, 2025

!!! Jump to Visual Demos !!!

This is the first update of the new year, so that’s nice. It’s kind of a low-key update. I mostly spent time trying to redesign some aspects of the InGameBuilder UI with a more configurable “Inspector” approach. The idea is that I can specify the layout, fields, and display properties associated with the Builder’s BuilderInspector and the UI and bindings (see Deep Dive on Builders) would be auto-generated as needed with proper display names, tooltips, and connectivity. I still don’t think I’m done with this process, and I’ve already identified some things that I will need to redesign, but it has been a good start. It has made things more convenient for me by allowing me to just change a config file (currently .CSV) and have the changes reflected in the UI immediately instead of having to find each UI element in the scene.

HIGHLIGHTS:

Linux Build:

I use a Windows machine for development, so I can test Windows builds easily enough. I can’t test any Mac builds, so I don’t even try building for it. However, I can test Linux builds. I have tried testing on some really old, crappy laptops with Ubuntu and Arch running on them, but the graphics artifacts are horrendous. Even using an Ubuntu VM on my main computer didn’t work because it could not use all the hardware resources on my laptop. I finally decided to install Ubuntu 24.04 and dual-boot into it. It still had sprites flashing around being unbearable, so I pulled the project to the Linux machine and tried making a build directly there. After also changing the graphics API from OpenGL to Vulkan (as per the sprite rendering package), I finally got it to build and RUN! No more sprite flickering. All this to say, a Linux build should be viable for the game :).

Builder Inspector:

  • BuilderInspector: A new MonoBehaviour that defines the pipeline for creating builder UI elements, connecting them together and handling their placement in a panel.
  • BuilderInspectorElementCreator: Responsible for creating an individual inspector element, whether that be a header, a group, or an input field area.
  • BuilderInspectorField: The main inspector element responsible for having inputs objects (sliders, fields, dropdowns, etc.) and corresponding BuilderBindings to connect to the InGameBuilder.
  • DetailsWidgetCreator: A better way to create DetailsWidgets on-the-fly. Used for QoL additions to inspector fields, like clicking a widget button to show a slider or show a translation widget for each field.
  • Lots of other scripts: I usually don’t highlight a lot of miscellaneous scripts I make, but there were a bunch of other ones I had to make to even get the BuilderInspector idea off the ground.

Tooltips:

  • Tooltip: Moved some functionality out into general helper/extension methods.
  • TooltipManager: New class that provides a central location/singleton for interacting with/showing a single tooltip.
  • SimpleTooltip: A MonoBehaviour with Tooltip functionality which operates mostly through calls to TooltipManager.

Video Demos

Old UI on the left, new BuilderInspector UI on the right. There are still some problems with the new UI, but the good part is it being auto-generated from a configuration file. There are collapsible groups and widget buttons. I will also condense a lot of things back into their nicer “table” versions. There will also be a bunch of hand-made UI still, especially for lists of fields, but this gets a lot of the boilerplate stuff out of the way.

Part of the config file for the Firing Point Builder. Configuration includes fields, display name, tooltip, group organization information, widgets information, and other attributes. Looking back at it, I should probably change to some nested configuration type like XML or JSON. That way I can more easily define and nest widgets and the fields that they create.

Demonstration of the new UI. Groups, tooltips, fields, and widgets were auto-generated from a config file.