To CEGUI or not to CEGUI

Started by
15 comments, last by Frank Taylor 12 years, 8 months ago
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.
Advertisement
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.

I Create Games to Help Tell Stories

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 http://www.antisphere.com/Wiki/tools:anttweakbar 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.
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
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.

Interested in Fractals? Check out my App, Fractal Scout, free on the Google Play store.

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).

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:
http://www.youtube.c...h?v=UWnBOgG9r1Q
http://www.youtube.c...h?v=E5jKSDXqSkE
http://www.youtube.c...h?v=d_MtZ04bjOI

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)

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.

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]
http://www.cegui.org.uk/docs/current/
See beginners tutorials :-)

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
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.
"Spending your life waiting for the messiah to come save the world is like waiting around for the straight piece to come in Tetris...even if it comes, by that time you've accumulated a mountain of shit so high that you're fucked no matter what you do. "
Not to CEGUI.

CEGUI is a well rounded mature GUI, however, I'm a advocate for developing your own GUI. If you consider the possibility that the entire 3D Game-world is a Graphical User Interface, 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 1,2,3), like me .

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.


If you're looking for a much easier to use and regularly updated UI then I'de recommend LibRocket 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 awful and so bad that I've never even tried to go back to it since.

Andy

"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile"

"Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."


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


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.
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 parallel inheritance hierarchy.

This codesmell is not specific to CEGUI - many popular GUI libraries do it. blink.gif
[size="1"]

This topic is closed to new replies.

Advertisement