Sign in to follow this  

To CEGUI or not to CEGUI

This topic is 2335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've started looking into UI libraries for my game, trying to weigh the pros and cons of each versus developing my own UI library. I'm hesitant to reinvent the wheel, especially when a lot of the UI libraries out there already handle fonts and caching and such which I would have to figure out from scratch if I were to write my own UI.

However, finding a UI library that isn't incomplete, discontinued, or just plain clumsy is proving difficult.

I know CEGUI has been around a long time, and has all of the features. I also remember a few years back when people had many complaints about CEGUI regarding it's cryptic codebase and archaic implementation. I'm curious if things have changed since then? Has it improved in recent years, or is it still a beast? I know Torchlight uses it to good effect, but I don't know if it was by choice or simply because it came with Ogre.

The other two I've been looking into are Gwen and MyGUI. Gwen looks pretty nice, but it is theme-based and doesn't look very configurable (all examples I've seen of it were skinned versions of the same design). MyGUI also looks promising, but it feels to be the least mature of the three. Has anyone actually used MyGUI? How does it compare to CEGUI?

I guess I'm looking for some updated pros and cons to CEGUI. Most of the opinions I've been able to find on it are years old, and if they're still true then I probably want to keep searching.

Share this post


Link to post
Share on other sites
I'm using CEGUI currently. I'd recommend it, though that is partially because every other library I found for the purpose was abandoned. Like you said, it's hard to find one that's still being maintained.

For CEGUI, I can say that the community is fairly helpful. I was having problems just getting the thing RUNNING and they patiently walked me through it. Also, at a slight nudge from me, they've realy started overhauling their documentation (primarily their wiki) and now info is easier to get at.

I don't find the codebase cryptic, but then I don't work with a lot of 3rd party code. All in all, CEGUI has a lot of nicely implemented features and the documentation to make using them fairly painless. So again, I'll recommend it.

Share this post


Link to post
Share on other sites
A good indication of how well a library is can be gleaned from how easy it is to complete the simplest of tasks. In a c++ program, the hello world can be completed by downloading any compiler, installing and running the code within minutes. After downloading the Crazy Eddies GUI library and trying to get somewhere with it --and failing, my first impression is that it sucks. CEGUI should have a stupid simple tutorial for directx, and opengl at a minimum, where it is shown how to do simple things, like create a window, button, etc. I looked over the page and found it to be very unorganized. If the page is like that, the code must be equally as bad.

For an extremely simple GUI that is easy to use and setup, check out [url="http://www.antisphere.com/Wiki/tools:anttweakbar"]http://www.antisphere.com/Wiki/tools:anttweakbar[/url] It is not a fully functional GUI like CEGUI, but it has many useful examples with complete code. None of the nonsense that I found at CEGUI.

Share this post


Link to post
Share on other sites
I also use CEGUI (because of Ogre), I haven't tried any other UI lib so I can't compare. It took me a while to get to grips with it but now I know whats what its ok. The editor I find pretty bad (maybe its just me), I do more just writting the xml than using the editor. I use it with lua and had no problems with that respect.

Share this post


Link to post
Share on other sites
Let me start by saying that I am a CEGUI team member so I may not be objective :-D (Kulik on the cegui.org.uk forums).

I think reinventing the wheel is a terrible option, good that you ruled that out.

Now for the rumors about archaic implementation :-) This is really subjective, to each his own but I think you will hardly find any open source GUI library that has a more pragmatic and clean API than CEGUI, the API is quite mature and we are working to improve it in 0.8. Most people who claim "CEGUI sucks" couldn't even get it going... (no offense smasherprog).

[quote]The editor I find pretty bad (maybe its just me), I do more just writting the xml than using the editor[/quote]
Efforts are being done to improve the tool situation and we have a new unified tool for editing all CEGUI related assets on the horizon:
[url="http://www.youtube.com/watch?v=UWnBOgG9r1Q"]http://www.youtube.c...h?v=UWnBOgG9r1Q[/url]
[url="http://www.youtube.com/watch?v=E5jKSDXqSkE"]http://www.youtube.c...h?v=E5jKSDXqSkE[/url]
[url="http://www.youtube.com/watch?v=d_MtZ04bjOI"]http://www.youtube.c...h?v=d_MtZ04bjOI[/url]

We are aware that documentation isn't perfect but I don't think the other libs are that much better in this regard (for example MyGUI is a great piece of code but with Russian code comments and virtually no support). We would appreciate any help in this regard (#cegui @ irc.freenode.net)

[quote]In a c++ program, the hello world can be completed by downloading any compiler, installing and running the code within minutes. After downloading the Crazy Eddies GUI library and trying to get somewhere with it --and failing, my first impression is that it sucks[/quote]
IMO this is not really a fair comparison, hello world has no dependencies. Comparing a Qt or Gtk hello world to CEGUI hello world would be a bit more fair but still a completely different thing.

[quote]CEGUI should have a stupid simple tutorial for directx, and opengl at a minimum, where it is shown how to do simple things, like create a window, button, etc.[/quote]
[url="http://www.cegui.org.uk/docs/current/"]http://www.cegui.org.uk/docs/current/[/url]
See beginners tutorials :-)

[quote]I looked over the page and found it to be very unorganized. If the page is like that, the code must be equally as bad.[/quote]
... As I said, we desperately need wiki editors.

HTH

PS: I don't visit gamedev.net often but I will subscribe to this thread, feel free to ask in cegui.org.uk forum as well

Share this post


Link to post
Share on other sites
I'm currently using MyGUI for a project. The main problem with it is the lack of documentation. Getting started with it can be a pain. But after that it really is simple and to the point. The layout editor (latest version) is great. If you end up choosing MyGUI and have some questions, let me know, i might be able to help you out.

Share this post


Link to post
Share on other sites
[b]Not to CEGUI.

[/b]CEGUI is a well rounded mature GUI, however, I'm a advocate for developing your own GUI. If you consider the possibility that [i][url="http://www.gamedev.net/topic/606675-the-entire-3d-game-world-is-a-graphical-user-interface/"]the entire 3D Game-world is a Graphical User Interface[/url][/i], you can apply your techniques developed for GUI event handling, messaging, and process optimization to other game entities. Additionally, your GUI code will be easier to fit into your engine design. This can save time. Who knows, you may want to develop your GUI using the Entity/Component Model (Ref [url="http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/"]1[/url],[url="http://www.gamasutra.com/blogs/MeganFox/20101208/6590/Game_Engines_101_The_EntityComponent_Model.php"]2[/url],[url="http://garage.gaspowered.com/?q=su_301"]3[/url]), like me .

Share this post


Link to post
Share on other sites
[quote name='Nairou' timestamp='1311296029' post='4838717']
I've started looking into UI libraries for my game, trying to weigh the pros and cons of each versus developing my own UI library. I'm hesitant to reinvent the wheel, especially when a lot of the UI libraries out there already handle fonts and caching and such which I would have to figure out from scratch if I were to write my own UI.
[/quote]

If you're looking for a much easier to use and regularly updated UI then I'de recommend [url="http://librocket.com/"]LibRocket[/url] far far far higher than CEGUI.

It has been a while since I used CEGUI but at the time I found it to be truly [b]awful [/b]and so bad that I've never even tried to go back to it since.

Andy

Share this post


Link to post
Share on other sites
[quote name='NineYearCycle' timestamp='1311330508' post='4838837']
It has been a while since I used CEGUI but at the time I found it to be truly [b]awful [/b]and so bad that I've never even tried to go back to it since.
[/quote]

Perhaps you could elaborate on your specific issues with it so we can improve these areas please?

btw: As for libRocket, I think HTML is not the greatest choice for game UIs, it's a page-based format, not a screen format. You get all the cons of Flash/Scaleform with virtually no decent authoring tools (especially since libRocket has some special important CSS attributes). This of course isn't a problem with libRocket but with the whole concept of using HTML for game UI.

Share this post


Link to post
Share on other sites
Last time I looked at CEGUI, which in fairness was at least 3 years ago, I was put off by (what I recall to be) a massive [url="http://c2.com/cgi/wiki?ParallelInheritanceHierarchies"]parallel inheritance hierarchy[/url].

This codesmell is not specific to CEGUI - many popular GUI libraries do it. [img]http://public.gamedev.net/public/style_emoticons/default/blink.gif[/img]

Share this post


Link to post
Share on other sites
[quote name='Martin Preisler' timestamp='1311332710' post='4838843']
[quote name='NineYearCycle' timestamp='1311330508' post='4838837']
It has been a while since I used CEGUI but at the time I found it to be truly [b]awful [/b]and so bad that I've never even tried to go back to it since.
[/quote]

Perhaps you could elaborate on your specific issues with it so we can improve these areas please?

btw: As for libRocket, I think HTML is not the greatest choice for game UIs, it's a page-based format, not a screen format. You get all the cons of Flash/Scaleform with virtually no decent authoring tools (especially since libRocket has some special important CSS attributes). This of course isn't a problem with libRocket but with the whole concept of using HTML for game UI.
[/quote]

Specific issues would be with from experience almost 5 years ago :) but ok, at the time it was the amount of boilerplate code, the raw nature of the signal/slot schema ([i]i.e; no helpful abstractions/wrappers[/i]), the already mentioned documentation, setting up the styles and overloads for them was also a pain at the time, back then there wasn't much of a GUI editor either so everything we did was done by hand editing xml files.

As for LibRocket, its simple to use which means you get going right away, you might hit issues later on but that's really an issue caused by attempting to use it for very complex GUIs and in all the games I've worked on that hasn't ever been an issue. As for page vs screen, that's almost a semantic argument. It allows for sub-windows, links to other pages ([i]as you'd expect from HTML[/i]), scrolling/movable windows etc, beyond that and you should be looking into more fully fledged GUI systems like QT, wxWidgets and maybe even CEGUI.

My apologies if CEGUI has improved drastically ([i]in the last 5 years[/i]) but given the comments from others above I'm not inclined to believe that it has. Changed, undoubtedly, of course but the same issues of up front complexity have been put forward by others, the steep learning curve, the editor still having issues, the doc's being almost unusable... this is all stuff we mentioned to the team 5 years ago.

Andy

Share this post


Link to post
Share on other sites
[quote name='mrbastard']
Last time I looked at CEGUI, which in fairness was at least 3 years ago, I was put off by (what I recall to be) a massive [url="http://c2.com/cgi/wiki?ParallelInheritanceHierarchies"]parallel inheritance hierarchy[/url].

This codesmell is not specific to CEGUI - many popular GUI libraries do it. [img]http://public.gamedev.net/public/style_emoticons/default/blink.gif[/img]
[/quote]
You probably mean Window and WindowRenderer hierarchies and I must agree on that point. This is definitely an area to improve. Other than that I don't recall parallel inheritance in CEGUI.

CrazyEddie is doing some research and we might move to a slightly different paradigm in 0.9, we want to have widget behaviors to allow easy creation of very specific widgets. To move away from the old school consistent GUI.

[quote name='NineYearCycle' timestamp='1311334490' post='4838855']
Specific issues would be with from experience almost 5 years ago :) but ok, at the time it was the amount of boilerplate code, the raw nature of the signal/slot schema ([i]i.e; no helpful abstractions/wrappers[/i]), the already mentioned documentation, setting up the styles and overloads for them was also a pain at the time, back then there wasn't much of a GUI editor either so everything we did was done by hand editing xml files.
[/quote]
CEGUI has changed a lot in these 5 years, styles/skins are done completely differently now (falagard skinning system - very powerful but desperately needs visual tool), as I pointed out above, we are working on tools - that is IMO the biggest downside to something like CEGUI, it isn't easy to prototype with and it isn't easy for artists to grasp, that should change quite soon :-) I will reiterate that I think the documentation is not perfect but is solid, dunno how it looked like 5 years back. Sure there are areas to improve and we welcome any effort to do so, our time isn't free/limitless...

[url="https://www.ohloh.net/p/CEGUI"]https://www.ohloh.net/p/CEGUI[/url]

[quote name='NineYearCycle' timestamp='1311334490' post='4838855']
As for LibRocket, its simple to use which means you get going right away, you might hit issues later on but that's really an issue caused by attempting to use it for very complex GUIs and in all the games I've worked on that hasn't ever been an issue. As for page vs screen, that's almost a semantic argument. It allows for sub-windows, links to other pages ([i]as you'd expect from HTML[/i]), scrolling/movable windows etc, beyond that
and you should be looking into more fully fledged GUI systems like QT, wxWidgets and maybe even CEGUI.
[/quote]
To each their own, I admit CEGUI isn't the greatest fit for very simple UIs. Most of the complexity fears come from the fact that CEGUI has a lot of dependencies. That is true but all of them are optional, it works in a lot of different environments and with a lot of packages but you don't have to use all of them.

[quote name='NineYearCycle' timestamp='1311334490' post='4838855']
My apologies if CEGUI has improved drastically ([i]in the last 5 years[/i]) but given the comments from others above I'm not inclined to believe that it has. Changed, undoubtedly, of course but the same issues of up front complexity have been put forward by others, the steep learning curve, the editor still having issues, the doc's being almost unusable... this is all stuff we mentioned to the team 5 years ago.
[/quote]
That's our biggest problem it seems, we have a lot of users, lots of projects but nobody seems to praise CEGUI, everybody just goes and hates it all over the internet. We aren't sure why this is happening to be honest but I understand that it can put someone off researching CEGUI, which is a shame IMO... Sure, the whole pipeline is complex but also powerful. It allows UI seen in Torchlight, World of Battles and other titles ([url="http://www.cegui.org.uk/wiki/index.php/Projects_Using_CEGUI"]http://www.cegui.org...cts_Using_CEGUI[/url]). Also, people claiming that it's complex are often ones who fear multiple DLLs, linking and compiling in general. You can't have a clean API without some verbosity.

Share this post


Link to post
Share on other sites
[quote name='NineYearCycle' timestamp='1311330508' post='4838837']
If you're looking for a much easier to use and regularly updated UI then I'de recommend [url="http://librocket.com/"]LibRocket[/url] far far far higher than CEGUI.
[/quote]

I didn't realize libRocket was still being regularly updated. There isn't much listed on their website. I had looked into it briefly, and ruled it out due to the use of HTML. I had assumed the use of HTML for the UI would mean the displayed UI would be static and hard to change on the fly. But now that I think about it, it probably isn't all that different from the XML layout files used by CEGUI. I'll have to give it another look.

I wish there was a comparison between libRocket and CEGUI somewhere. Without any experience in using UI libraries, I feel like my decision will boil down to a comparison of features and majority opinions from other people. As Nanoha said, the fact that a published game uses CEGUI makes it feel like the safer option, but that is mostly a lack of knowledge about the benefits of the alternatives.

Share this post


Link to post
Share on other sites
[b]Nairou,

You are not reinventing the wheel... you are learning. [/b]You can learn a lot from a GUI, if you consider the possibility that [i]the entire 3D Game-world is a Graphical User Interface[/i]. In developing a GUI you will discover techniques for event handling, messaging, and process optimization for other game entities and game mechanics. GUIs are built entirely on the concept of user interactivity. Interactivity is what separates our Artform from the other passive entertainment media/mediums. Dependent on your game, you may require special types of Widgets not found or adaptable in a pre-made GUI Lib. Somewhere in creating your interactive gameworld, you will duplicate methods that exist within a GUI.

Share this post


Link to post
Share on other sites
[quote name='Nairou' timestamp='1311350547' post='4838980']
I didn't realize libRocket was still being regularly updated. There isn't much listed on their website. I had looked into it briefly, and ruled it out due to the use of HTML. I had assumed the use of HTML for the UI would mean the displayed UI would be static and hard to change on the fly. But now that I think about it, it probably isn't all that different from the XML layout files used by CEGUI. I'll have to give it another look.

I wish there was a comparison between libRocket and CEGUI somewhere. Without any experience in using UI libraries, I feel like my decision will boil down to a comparison of features and majority opinions from other people. As Nanoha said, the fact that a published game uses CEGUI makes it feel like the safer option, but that is mostly a lack of knowledge about the benefits of the alternatives.
[/quote]
Sadly no comparison AFAIK. Someone should do one ;-) And yeah, CEGUI is very old-school proven kind of GUI system. If cross platform support is not an issue for you, you might also look into Garshasp (on Ogre forum), they used Flash through ActiveX.

[quote name='T e c h l o r d' timestamp='1311352682' post='4839002']
[b]You are not reinventing the wheel... you are learning.[/b]
[/quote]
While learning sure is great I generally STRONGLY prefer getting things done. Reinventing everything will get you nowhere. You could also write your own graphics library (because OGL and DX are not good enough!), write your own kernel, design your own CPU architecture, etc...

I wasted too many years working on an OpenGL game engine before I realized using Ogre3D saves you so much headache. It's just what beginners do (I think), they want to write their own thing! More experienced programmers reuse where possible.

Even if you stumble upon something in open source library XY that really bugs you, you can just create a patch and get it upstream or even fork it. It still is much less time consuming than rolling your own.

Still, to each their own :-) Also, from what I've read in T e c h l o r d design material, we might be doing something remotely similar for CEGUI 0.9

Share this post


Link to post
Share on other sites
[quote]Also, from what I've read in T e c h l o r d design material, we might be doing something remotely similar for CEGUI 0.9 [/quote]
:P Awesome!

BTW, I am an advocate for CEGUI and recommend it above all others if one has absolutely no desire to create their own. I have motivated others to start projects like this [url="http://forum.thegamecreators.com/?m=forum_view&t=183417&b=22"]one[/url]. Many debate over [url="http://scientificninja.com/blog/write-games-not-engines"]writing games, not game engines[/url], but, I would encourage folks to write GUIs instead.

Share this post


Link to post
Share on other sites

This topic is 2335 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this