Jump to content

  • Log In with Google      Sign In   
  • Create Account


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
7 replies to this topic

#1 Dave   Members   -  Reputation: 1481


Posted 28 November 2012 - 05:35 PM

I post here because the forums at Molly Rocket seem more dead than tank tops.

I'm looking into this for a second time and i really can't decide whether:

a) Everything i want to do with it is possible.
b) It's actually any more simple than a well written RMGUI.

To those of you here that have written a decent IMGUI, or have atleast attempted one, i'd like to know how you:

a) Implemented modal dialogs.
b) Implemented draggable windows.
c) How did you identify a control between frames? I don't think the user passing an ID in to each Do*() method is an acceptable solution.
d) Do you have a designer for it or is it all hand coded? In most cases not having a designer is not acceptable.
e) Did you notice any performance issues when doing multiple passes over the UI code. It has been suggested that to solve the modal problem you need to do an examination pass before the input pass in order to detect ahead of time that something is modal.
f) Did you find any performance issues with alot of widgets?
g) How did you persist state between frames?

It also appears that the Unity 3D Editor is written entirely in an IMGUI and it's certainly pretty complex and this is encouraging however im not sure i believe it to be true yet as running fraps gives a framerate only for the game window. Not sure why the rest of the Unity Editor ui doesnt have a framerate if it is indeed immediate.

IMGUI or RMGUI guys, i don't see the answer yet, what's your take?


#2 smr   Members   -  Reputation: 1557


Posted 28 November 2012 - 05:59 PM

Personally I think the immediate mode gui is not sufficiently simpler to implement over a retained mode gui. Their implementations are mostly identical, except that with an immediate mode gui you define your gui with more implementation. Why not take the additional small step to store the parameters of the gui in some structure? It's not that much additional work. From that point it's only another small step to be able to define your gui outside of code.

Edited by smr, 28 November 2012 - 06:00 PM.

#3 Krohm   Crossbones+   -  Reputation: 2964


Posted 29 November 2012 - 04:33 AM

To my own surprise, it has been more than two years since I asked something about this.
My efforts on IMGUI resulted in a total loss. At the end, I ran out of time and I had to go back to the legacy GUI system.
It appears to me that IMGUI hasn't delivered. Many people would object that IMGUI is just GUI as it has always have been on consoles. That might be the case but a generic system is a different thing from a specific system.
I am very worried about the fact unity is still noted as example two years later. I would expect something more.

My main concern is that IMGUI proponents appear to be selling on
  • IMGUI is easier
  • IMGUI is implicit
  • IMGUI can do everything RMGUI can
It appears to me that those, taken alone, are true statements. But I'm not really sold they are true at the same time.
Take for example "can do everything RMGUI can". No, it cannot. Examples in the thread I've linked. It can do so only if IDs are generated and this is non-trivial. Once you generate IDs, say goodbye to the "implicit" part of the discussion.
And, to be honest, after trying to implement it, even for a barebone system, I'm unsure it's really "easier".
Sure it's not going to plug with the usual workflow without some effort.

Personally, when I first read CEGUI documentation, there was so much emphasis on Lua at the time I had the impression in was a very important requirement. It isn't the case, and I'm now looking at a complete CEGUI integration. So everything about that is now irrelevant to me.

#4 Dave   Members   -  Reputation: 1481


Posted 29 November 2012 - 08:23 AM

Thanks for replying guys.

@smr - Yes i agree

@Krohm - Your thread there was one that i came across while researching this. As you say it's kinda surprising that for a technique that is supposedly so much better that there are still only very few (if not only one) commercial examples of it in use. I suffer the same problems as you did in that thread and i think it is clear that an RMGUI is the most suitable solution for me in my project.

I was actually scripting my IMGUI with Lua and to be honest that was quite powerful in itself, but it wasn't scalable.


#5 Zipster   Crossbones+   -  Reputation: 560


Posted 30 November 2012 - 02:50 PM

Every time the subject of IMGUI comes up, I do a Google search to check on how far the concept has come along and how much traction it has gained since I first heard of it. I came across this tutorial which walks you through the process of creating a very simple IMGUI system and it helped solidify my understanding of the low-level design. There's a natural elegance to the code, however I'm not convinced the idea has come far enough yet to be preferable to RMGUI for any non-trivial interface, or at least to be used as the infrastructure for a general multipurpose GUI library.

What's interesting to me is that I've yet to come across an opinion of IMGUI from an actual UI artist or designer; someone who doesn't necessarily have a programming background. All the forum posts and blogs I've read tend to be discussions between engineers. It seems to me that at the very core of IMGUI you have code driving all aspects of the UI. But in all my years of working on GUI systems, the most important goals that always had to be met were that the UI be quick to prototype, fast to iterate, and easy to skin, without any intervention from the engineering team (other than the occasional feature request). IMGUI seems to rely primarily on the engineers to first design and implement the UI, and then hand off to the artists for skinning. This might work for small or indie projects where your engineers are also designers or artists, but from my experience this is not how a department of dedicated UI people expects to work. It typically goes: design coordinates with the UI team to figure out what functionality the UI needs. The UI team then determines the best layout in conjunction with the artists in order to meet the design team's needs. This is when prototyping and iteration speed is a priority, because they need to be able to figure out quickly what works and what doesn't work. Artists then skin everything to look pretty. Only once the art/design/UI teams are happy do they send it off to the engineering team to plug in backend functionality so that all the buttons and widgets actually do something. You can go through this process several times as designs change, but at the end of the day it's the engineering team servicing everyone else. They're at the end of the pipeline. I don't see how any of this workflow is possible with a code-driven GUI system, which makes everyone depend on engineers.

Ultimately the problem is that a UI designer/artist wants to be able to place down widgets and give them some data (X/Y/Size/Texture/Animation), that exist regardless of how code uses them, and IMGUI is all about eliminating the widgets and having their functionality and existence being driven entirely by code. I'm not sure how you can easily reconcile those two things. That being said, perhaps all IMGUI is missing are robust toolsets that provide UI people the ability to design/skin UI as they always have in the past, and then feed their work into some elaborate code generator that spits out the code to drive that particular UI scene. The UI team gets the workflow they want, and the engineering team gets to have the code that defines the UI and tweak as necessary. Time will tell, I suppose.

#6 web383   Members   -  Reputation: 740


Posted 04 December 2012 - 11:26 AM

I think Zipster hit it spot on.

RMGUI's cater towards artists/designers at the front of the pipleline and programmers at the end. IMGUI is the exact opposite - programmers will implement the logical components of the gui and then can expose the data (layout, color, theme, etc) for artists/designers to tweak.

I suppose it really depends on the project/team you are working with. If your engineers are nothing more than code monkeys, and need specific requirements for everything they write, then RMGUI may be best suited. However, if the engineers are making more of the design decisions, and you just want to outsource your art, then IMGUI may be best suited.

To answer some of the OP questions:
a) I would implement modal dialogs as part of a layered screen system, and use multiple IMGUI objects. You can push and pop "screens" onto the stack and trap input to the top level. Typically though, IMGUI does not support overlapping widgets.

b) Draggable windows are implemented by returning the (x, y) position of the window out of the function, and using them as inputs for the next frame. The IMGUI will store the mouse drag information in it's internal state.

c) I don't think you can identify controls throughout a frame. All widgets are independent of eachother. I'm having trouble coming up with reasons why you need to identify a control with IMGUI.

d) As in the paragraph above, IMGUI is probably better suited for programmers at the beginning of the pipeline (i.e. hand coded), and then expose whatever data you need tweaked to the artists. Using a generic designer to be later implemented into the game by programmers doesn't really make sense to me with IMGUI. The IMGUI is tightly coupled to the code flow.

e) I don't have an answer.
f) I don't have an answer.

g) An IMGUI can store whatever data it needs between frames. Typically it stores a variety of IDs that reference to what widget is 'hot' or 'active'. The key point about IMGUI is that typically only one widget can be interacted with at a time, so storing state in every individual widget is a waste.

#7 Krohm   Crossbones+   -  Reputation: 2964


Posted 05 December 2012 - 03:07 AM

c) I don't think you can identify controls throughout a frame. All widgets are independent of eachother. I'm having trouble coming up with reasons why you need to identify a control with IMGUI.

Because you might need to associate a specific state with it. If the state is part of the model, that's no trouble (except the code needs to cater with this possibility). If the state is part of some external setting (such as skinning) the code has no way to deal with this. When scripting enters the picture the need for robust state association becomes a priority (as mis-guessing a control state association might violate some invariant).

Personally, after IMGUI, I looked at cocoa bindings and I found them quite more promising. Unfortunately, the amount of machinery required to make them work is scary.

#8 Dave   Members   -  Reputation: 1481


Posted 05 December 2012 - 07:14 AM

Thanks for the replies guys, i think given that there is still so much doubt over how some of the issues i mentioned might be solved im just going to revert back to a retained GUI. I know however is solved in there.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.