Hud is Hard

Let’s add some simple texts over the gameplay, so the player can actually see what’s going on. How hard can it be? A lot harder than I expected.

To be honest, I didn’t expect much of a challenge. Just some basic ship readouts shown over the display. It turns out there is more to it.

  • For starters, internationalization. If you don’t start your project as multi-lingual, it’s near to impossible to add language support later. So, with first texts to display I added proper i18n. Fortunately Godot has it’s set of options.
  • I wanted each ship to have its own HUD. It seems logical – today’s cars have different dashboards, why should starships be unified? But this required me to set up a framework for HUD.
  • There are sensors to implement. While I could just read data from physics engine directly, I wanted a capability to have a broken acceleration sensor, or other fun quirks. Bit of a feature creep, but turned out to be quite simple – but it did require me to design a universal, if simple, API for that.
  • And finally – either I’m way under proficient with Godot’s UI toolset, or it’s quirky. I need to spend way more time on it to have some good-looking UI. This is an unexpected setback.

Well, at least a stub is done. Next – polishing and real HUD layout.

Leave a Reply