Skip to content

Instantly share code, notes, and snippets.

@giulianob
Last active February 25, 2021 11:29
Show Gist options
  • Save giulianob/c013c8549bf2d95d83b5186c6d5e691c to your computer and use it in GitHub Desktop.
Save giulianob/c013c8549bf2d95d83b5186c6d5e691c to your computer and use it in GitHub Desktop.
ElasticSearch UI Work In Progress

This is a prototype ElasticSearch UI made with the Godot game engine and C# for cross-platform goodness with incredible performance.

The idea of using a game engine may seem very odd but hear me out. Using a game engine gives me control over how everything gets rendered to the screen. It also means things really do look 100% the same cross-platform (for better or worse) since it's being rendered directly via OpenGL/Vulkan. This is actually what Flutter does and people seem to be going for it.

There are two major caveats thoughs. First, game engines typically work by rendering the entire view every frame since it's likely there are many changes in the screen. This is usually not something you want in a desktop application where very little changes between each frame since you're wasting CPU/GPU cycles. Godot is somewhat unique in this aspect since the Godot editor is built using Godot itself (meta I know) and it supports "retained mode" where if nothing changes in a frame then the engine doesn't re-render the frame. Second, we're not getting any of the primitives the OS gives us such as typical shortcuts, context menus, etc... This is definitely true. Fortunately, the Godot UI library already contains all of the basics and they work as you'd expect cross-platform. I'd also like to point out that I could make the same argument about Electron/Flutter but of course those are MUCH more popular than Godot. There is some extra work on my plate whenever I run into something that Godot doesn't support but I think the trade off is worth it since I know I will be able to get great performance, low resource usage, and really customize the final result of the application to what I really want.

As part of this project, I also have helped contribute to the engine and made a small PR to the engine for a performance fix to the tree component where it would re-render anytime the mouse hovered around it. The engine is written in C++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment