News for hackers. Stuff that matters.
Re:Immediate Mode GUI Programming by bartwr on Monday January 15, 2024 @08:39PM (#39008353)
I'm a former game dev and I used ImGui a lot and don't think it's used because those reasons.

It's used for quickly hacked debug tools to interleave UI and regular logic and not do a logic/view separation (as it would result in code bloat and a necessity for a refactor). You want UI code do some logic (like modifying properties of some game entity or renderer) and prefer to inline it. Lots of game code is effectively YOLO without even a single test. It's also typically guarded by IfDefs and compiled out of release versions.

But as soon as it stops being just hacky debuggers and people try to write proper tools in it, it becomes much more of a pain - people try to (poorly) emulate a retained mode in it, hold state, cache - and it becomes unreadable mess.

Re:Immediate Mode GUI Programming by 1ark on Tuesday January 16, 2024 @01:15AM (#39010039)
This is such a good and clear take.
Re:Immediate Mode GUI Programming by ocornut on Wednesday January 17, 2024 @06:48AM (#39026496)
> But as soon as it stops being just hacky debuggers and people try to write proper tools in it, it becomes much more of a pain - people try to (poorly) emulate a retained mode in it, hold state, cache - and it becomes unreadable mess.

Effectively people are hasty and don't spend the time to try doing things nicely, in particular because the first steps and debug use allow you to do quick things.

But I don't think it's a fundamental property of IMGUI or Dear ImGui that "proper tools" become particularly more of a pain. Of course it is more work to make a proper tools than hasty-debug-tools, and I can easily see how underengineering can back-fire (over-engineering it likewise).