What do you think about using a game engine for UI?
A mate is building a UI for an app using a game engine. At first, I was - WTF, but now, a few hours later, I think that there could be some merit in it. Imagine the experience of excel being implemented inside a virtual world. I’m not sure that there will be adoption, but it could be quite original.
53 comments
[ 3.8 ms ] story [ 128 ms ] threadSomething like Dear Imgui can be very nice to work with though.
There's a reason why a lot of people use Electron for apps and it's because the amount of effort it takes to write HTML / JS and have a functional UI is very little.
It seems like you like the idea in order to implement a novel UI and I suspect then yes a game engine is a good idea. However, do consider the UX of your app. Excel is a spreadsheet because that is pretty much the best way to display tabular data. So if the novel UI isn't a better UX than an existing way you probably don't want to do it.
For multi-platform builds, there are single code-base frameworks available:
https://quasar.dev/
For MacOS, Linux Gtk, and Windows native builds there are mature free libraries that allow both FOSS and commercial static linking:
https://wxwidgets.org/
Game engines are designed to solve a single set of use-cases for optimization, and portability is usually terrible outside the current windows release.
Best of luck, =3
https://www.unrealengine.com/en-US/spotlights/rivian-brings-...
https://docs.godotengine.org/en/stable/about/list_of_feature...
> Godot's GUI is built using the same Control nodes used to make games in Godot. The editor UI can easily be extended in many ways using add-ons.
And they even go as far as to explicitly say the following:
> Godot's small distribution size can make it a suitable alternative to frameworks like Electron or Qt.
I’ve only used Godot for game development, not GUI stuff yet. (The game I started making doesn’t have any menus, I’m working on gameplay and level design first.) But I’m personally keeping a mental note in the back of my mind to investigate building bona fide desktop applications with Godot also, and not just games.
Also, if you’re going to make an application instead of a game, they have a special mode they recommend that you use:
> When creating a non-game application, make sure to enable low-processor mode in the Project Settings to decrease CPU and GPU usage.
https://docs.godotengine.org/en/stable/about/faq.html#is-it-...
I think the only thing holding back adoption is that web devs are largely unfamiliar with gamedev. The control node and material styling is very different from html and css and would require brand new paradigms for team level development. If you're an ambitious solo dev though it's easy enough.
https://www.unrealengine.com/en-US/spotlights/rivian-brings-...
However, you could use game engines for interactive exhibits and demos.
https://akkartik.name/freewheeling
https://akkartik.name/freewheeling-apps
Only way to live, IMO. I can't make networked apps yet, but that's coming soon to LÖVE.
For anything else it is almost certainly more work for the dev and more resource-intensive for the system.
One thing I haven't seen anyone else mention is that a game engine is generally going to be re-rendering constantly, as part of the game/render loop. This is because in a game it is almost always the case that something is changing on screen at any given moment.
In a more "normal" app UI, most things are static, so having a render loop operate like that doesn't make much sense. So instead things are optimized for the static case – if nothing is happening on screen, resources are not being used.
(1) it wants to be a bicycle for the mind, a simulation playground where you edit something things and the environment changes -- something a game engine could "excel" at
(2) it sucks in a whole bunch of ways, but it's hard to displace. People use it to do things with CSV files that somebody would use pandas for if they wanted to get the right answer. People use it to do things they'd be better off using Access or SQLlite. And then people use it to calculate things
(3) At this moment I'm making some simple models of businesses w/ Excel, one sheet is calculating the value of a comment on this site, roughly $600B evaluation, 7% equity stake, HN responsible for 5% of that value (brings in founders and employees) with a total of 50M comments, I get a eye-popping value of $50 per comment!
It's actually ugly in Excel, for instance I don't really want things on a grid, I want to make the calculation immediately clear as a graph, I just wish that this product
https://en.wikipedia.org/wiki/TK_Solver
had a bunch of sequels. If anybody can make the next thing I'd love to see it. It's tough because Excel comes with Powerpoint, Word and other tools in Office 365 so it seems free to people. Then there's that inferior Google Sheets.
There's nothing quite like the optimism of a VR fanboy. Is there any other thing in tech that drives such ungrounded dreams?
Game engines and their rendering models are usually doing work every frame by nature of their design. A retained mode, event based GUI doesn't need to.
That and you can basically say goodbye to hooks for accessibility, common/standard shortcuts, etc.
The power usage I see is: web browser running a document << game engine running a simple UI << web browser running a simple UI on wasm << game engine running a serious AAA game.
The accessibility point is very valid.
This already exists, and is called EVE Online.
Game engines are generally capable of creating hardware accelerated 2D UIs which could be great in some cases where highly dynamic UIs are desirable. But making a business app 3D for no reason is a different story.
The later is largely what "The Metaverse" as Zuckerberg sees it is trying to accomplish. Check out Horizon Workrooms and the like.
I've worked at a number of agencies over the years and at one point years back a client insisted on Unity for their mobile app because it worked cross platform out of the box. It was an unmitigated disaster because we were trying to fit a square peg in a round hole. Tens of thousands of dollars wasted.
It's actually got quite a few nifty features, but my team ended up not really using it. I particularly liked the "walking into a room automatically joins you to the audio channel" bit for meetings, but it's ultimately a bit of a gimmick.