Popcar's Hub

Using Godot for GUI App Development

Table of Contents


Introduction

Godot has some serious untapped potential when it comes to creating GUI applications for desktop and mobile. I've been saying this ever since Godot 4 came out, but now after releasing GodotOS, I feel like I finally know enough about Godot to talk about it. So let's talk about it!

The short version is that Godot is great for app development, but there are some caveats and things that can really be improved. Overall, I would definitely recommend it, even if it's just to mess around and give it a try.

Using a game engine for making applications...?

Using Godot to make desktop apps isn't as wild as it sounds. Godot has a ton of built-in tools that make creating a complex user interface really easy. There are a lot of examples of fantastic apps made in Godot such as Dungeondraft, Material Maker, Pixelorama and Lorien.

RPG In a Box was also made in Godot!

But the showcase for Godot is... Well... Godot itself! The editor was made almost entirely using its own UI system, it's a testament to how powerful and flexible the tools are.

Fun fact: Tesla's mobile application is made in Godot.

Why use Godot for app development?

There's a ton of GUI frameworks and tools out there, but there are a lot of benefits that Godot offers that I can't seem to find elsewhere. I can talk about it for ages but here are the bullet points:

There's a lot to like here. I'm also a big fan of the way the Node system works and encourages composition over having one giant singleton managing the state of everything.

Did I say rapid prototyping already?

Dynamic UIs are really cool and underappreciated

I want to talk a bit about how much I love smooth, dynamic user interfaces. Back in ~2008, a ton of websites and apps were made with Flash rather than the typical HTML/CSS/JS tech stack used today. They were really cool because Flash excelled at being dynamic. Elements slide around the screen, things had pretty animations, and it wasn't as rigid as modern day apps. It also ran like trash and had glaring security issues, but my nostalgia goggles don't care.

My point is, ever since Flash died we never really got anything like it. Modern GUI frameworks make it hard (or in some cases impossible) to move things around in the screen without breaking the layout. It's definitely possible, and people have made literally everything with Javascript, but it's much more difficult than it should be. Also, deviating from current functionality would probably mean having to learn yet another library or framework, and nobody wants that...

To illustrate what I mean: I made a small application called Morse Code Simulator. Making the UI was the easy part, and I ended up finishing the project in roughly 2 weeks.

Things like the paper animation, spawning a floating text to confirm copying to clipboard, and a settings overlay would be a pain to make anywhere else. If I had used a web development framework, it would have taken me way more time and effort. If it were a native UI framework, I would've given up already.

I know, I know. Some of you are wondering if this even matters or if anyone cares. For me, it definitely is important to have the freedom to create whatever I want rather than rely on default, boring widgets.

Why you maybe shouldn't use Godot for GUI development yet

Let's not get too excited, there's a lot of things that Godot isn't very good at and some may be deal breakers for some people.

One important deal-breaker is the lack of accessibility. Godot doesn't have screen reader support which is a problem. There is a draft pull request for adding screen reader support, but nobody knows when it'll be finished and merged.

Another big gripe I have with Godot is the way it handles text. Fonts can be a bit frustrating to deal with if your app has a dynamic scale. By default, fonts don't upscale properly in Godot. You can turn on MSDF to fix this and fonts will scale beautifully. However, I found this setting to break the kerning of most fonts. A big chunk of google fonts also aren't rendering properly.

In terms of just using text, RichTextLabels can also be a little annoying to deal with. You have to use BBCode to align text horizontally. So if I want to center "Hello World!" I would have to set the text to "[center]Hello World![/center]". Not ideal especially if you edit text a lot on runtime and have to prepend [center] everywhere. There's also no setting to center text vertically (you have to anchor or use a CenterContainer) and no setting to expand text size to fill the label. Things like this make dealing with text annoying, and needs a quality of life pass.

Making web apps with Godot 4 isn't 100% viable yet. The web export's binary size is bigger than I'd like. Compressed, a small project takes up about 8MB in size. If you're planning on making web-apps and don't mind the large size, you should also be aware that Firefox and Chrome on MacOS can't load Godot games properly. Everyone is waiting on Google and Mozilla to fix that...

Other mild annoyances:

All of this might sound like a lot, but in the grand scheme of things Godot definitely does more right than wrong. Aside from accessibility, my other notes are pretty minor.

The secret sauce: GDExtension

One specific thing that really has a lot of potential is GDExtension: Godot's tech for running external code and libraries. It's currently experimental and lacks some documentation, but there's already a lot of extensions being made. Of course, there's already Rust bindings.

Potentially this could mean you would use any programming language you'd like, and easily import any programs that already exist and use Godot as just a UI editor. Very nice!

Keep in mind that if you're just implementing a terminal app, you can always just use OS.Execute() instead.

Technical notes you should know

An important thing to keep in mind when researching Godot is that Godot 4 came out early 2023, and it overhauls pretty much everything in the engine. As such, there's a lot of outdated information on what Godot can and can't do. Some things that Godot 4 can do that it (maybe) previously couldn't includes:

The last important thing you need to know is that you'll want to turn on Low Processor Mode in the project settings. This makes it so that the screen only refreshes if something changes, as opposed to the default behavior where it would refresh every frame (which is typical for games).

Conclusion

In the end, choosing the right dev tools for you will always be opinionated. As someone that was never a fan of modern GUI frameworks, Godot was everything I wanted: simple, powerful, hassle-free.

It won't be everybody's cup of tea, and I don't expect it to be the "next big thing", but I can definitely see Godot start rising in popularity as a serious production-ready tool for making GUI applications. Looking forward to seeing more cool stuff made with it.


This post took some time and effort. If this was helpful at all, please consider donating to me.

I also work as a freelancer in my free time. If you need anything Godot related, shoot me an e-mail.