5 ms·
Re-upping this blog post (sadly overlooked when first posted to HN) which asks the reasonable question 'why not just use Godot for general-purpose applications?
by anigbrowl 6y ago
Re-upping this blog post (sadly overlooked when first posted to HN) which asks the reasonable question 'why not just use Godot for general-purpose applications?'
https://medium.com/swlh/what-makes-godot-engine-great-for-advance-gui-applications-b1cfb941df3b https://medium.com/swlh/what-makes-godot-engine-great-for-ad...
- codegladiator 6y agoYes please I have always wondered why is this not a thing
- krapp 6y agoBecause of Electron.
- blargmaster33 6y agoWPF already exist.
- jayd16 6y agoI can't read the linked article without logging in but in my experience its not ideal for several reasons. Game engines are designed around game loops executing code every frame and not around power efficient layout caching. Orthrographic hierarchies are how UIs are usually laid out and its a mild pain to move to a system that's depth sorted, with custom shaders etc. You can do more but you need to think about more and its harder for the UI system to know what parts of the screen can be redrawn. Games usually just draw it all every frame. Specifically for a game engines, they usually don't do things like OS integration for accessibility, subpixel font rendering, that sort of thing. In theory they could but usually game engines seem to roll their own system for this.
- pixelpoet 6y agoI really love ImGui but what you described (accurately, I don't know why you got silently downvoted) is my biggest problem with it for general UI use. It's actually quite difficult to hack to make it not need 60+ fps updating; I've tried and was not really successful, wrote about some of the issues on reddit: https://www.reddit.com/r/cpp/comments/hcpoc0/how_to_add_a_gui_to_a_c_program/fvi383q/ https://www.reddit.com/r/cpp/comments/hcpoc0/how_to_add_a_gu...
- Jasper_ 6y agoThere's a lot of functionality that a general purpose UI library has that Godot will likely never approach, like support for input methods in text editing. Productive applications require extremely robust text editing, something that game engines don't spend a lot of time with. Stuff like selection, text input for non-English keyboards, IME popups, that sort of thing. Even RTL text display is usually minimally unsupported. I also don't know of any game engine that supports multi-window display in any coherent way.
- alfalfasprout 6y agoGodot is open source. There's nothing stopping people from adding this functionality.
- Jasper_ 6y agoI'd argue multi-window would require a substantial redesign of the graphics layer, so much that the maintainers would be uninterested in supporting it, and consider it out of scope. I can imagine IME support being integrated, but a giant pain, due to the wide variety of APIs across platforms, the fundamental disconnect in how text input is done in games vs. elsewhere, not to mention the "Linux wars": will you support ibus or fcitx? So it requires someone to step up and do the work, and don't be fooled: it's a lot of work.
- ForLoveOfCats 6y agoGodot 4.0 recently acquired multiple window support for the editor (which is built with Godot's UI and rendering system) and APIs for applying it to your own games
- giulianob 6y agoJust to clarify for those following along. Godot IDE is using the same UI components that you can use in your games. Godot 4 will support multiple windows. They're working on RTL I believe and it actually has a very robust code editor with debugger in the editor. Most of the points being raised here don't seem to be based on actual experience with the framework.
- speedgoose 6y agoIt's interesting. Can you easily deploy a Godot ui to the web?
- worble 6y agoIt supports web as an export target, although there are some limitations: """ Unimplemented functionality The following functionality is currently unavailable on the HTML5 platform: - Threads - GDNative - C# - Clipboard synchronization between engine and operating system - Networking other than HTTPClient and WebSocketClient """ https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_web.html https://docs.godotengine.org/en/stable/getting_started/workf...
- Lerc 6y agoMuch of these are not limitations of the export but of the platform. Web workers don't rise to the functionality of threads (wasm will surely grow decent thread support one day) GDNative by definition is for native. My game using C# exports to web fine, So that's working. Still a fairly huge download for a web game though, not really any worse than the Unity ones though.
- dang 6y agoI'll put https://news.ycombinator.com/item?id=23308303 https://news.ycombinator.com/item?id=23308303 in the pool for inviting a repost.
- cercatrova 6y agoYou can. This is exactly what Flutter does, as I've commented on that thread you refer to on HN. It uses the Skia renderer that is like a 2d game engine to draw all the elements on the screen. They've had to reimplement everything though, like text fields and accessibility, so perhaps this is why it's not done more often.
- The_rationalist 6y agoAny electron app is also a skia app and writing an app with skia only is needlessly too low level.
- giulianob 6y agoTo be fair this is what Electron does too via the browsers. It's just doing it via the worse possible way by leveraging technology that's awful for building UIs. I'm a fan of flutter they're definitely onto something. I hope they can bring it to the desktop in a way that works well too.
- ttgo 6y agoWe often hear saying game engines redraw every frame so it is not appropriate for UIs. In Godot, you can set an option to redraw only when something change like in UI libs (for e.g Godot Editor use this option) However , I think one main aspect missing from UI libs is damage tracking (=redraw only the part of the screen that changed and tell the compositor to also only redraw that part). In terms of architecture, Godot is all I want. I wish I could build general purpose apps with it. Everything is a node & just simple trees. Abstraction of everything you need over all platforms. GDNative let you access everything from any language. I really wish I could build everything with Godot. I enjoy it so much more than web dev or android dev even for UI
- krapp 6y ago>I wish I could build general purpose apps with it. Why can't you? I mentioned this in the previous thread about this, people build general purpose apps in Unity all the time. And Godot's own UI is a Godot application. There may be some edge cases where it doesn't work, but considering the current standard for native applications is to wrap webapps in individual Chrome instances, I can't see Godot being subpar.
- ttgo 6y agoAs I mentioned, the lack of damage tracking is an important problem. It leads to high CPU/Battery usage which isn't great for laptop & phones. Electron/Web might eat lots of ram but I think the renderer is more optimised for UI and will use less CPU/Battery. Also Godot has an internal architecture made for games which might be a bit overkill/less elegant for UI-only apps : https://godotengine.org/article/why-does-godot-use-servers-and-rids https://godotengine.org/article/why-does-godot-use-servers-a... I'm not sure if the separation of logic and rendering in separate threads like that is the way you would build a high perf UI library
- giulianob 6y agoYou can just make sure to set the low processor mode and you're good. The latest 3.2.2 introduced some fixes which help as well. It will only draw whenever a component actually requests an update.
- PinkMilkshake 6y agoPeople already do to some extent. That article mentions one example, the Trello clone (frontend?), but there are others like in this Reddit article: https://www.reddit.com/r/godot/comments/a809ij/godot_for_application_development/ https://www.reddit.com/r/godot/comments/a809ij/godot_for_app... * The Godot editor itself: https://docs.godotengine.org/en/stable/getting_started/step_by_step/godot_design_philosophy.html#the-godot-editor-is-a-godot-game https://docs.godotengine.org/en/stable/getting_started/step_... * GUI Toolkit: https://github.com/Quark-Toolkit/Quark https://github.com/Quark-Toolkit/Quark * Pixel art editor: https://www.orama-interactive.com/pixelorama https://www.orama-interactive.com/pixelorama * Particle effects editor: https://benhickling.itch.io/blastfx https://benhickling.itch.io/blastfx * RPG builder: https://www.rpginabox.com/overview/ https://www.rpginabox.com/overview/ * Fantasy map editor: https://www.wonderdraft.net/ https://www.wonderdraft.net/ * Brainfuck IDE: https://github.com/wmww/BrainfuckIDE https://github.com/wmww/BrainfuckIDE * 3D presentation editor: https://github.com/janparkio/3d-presentation-godotengine https://github.com/janparkio/3d-presentation-godotengine I've looked in to this myself and noted the following: * It's easy to compile out features you don't want (3D, physics, etc.): https://docs.godotengine.org/en/stable/development/compiling/optimizing_for_size.html https://docs.godotengine.org/en/stable/development/compiling... * While Godot has a small file size, it's Hello World memory usage is ~300MB, which I think is even more than a Hello World in Electron (perhaps fixable by removing features) * There is a setting to stop UI updates when the window loses focus which means it doesn't chomp CPU/GPU while not in use