Jabberwocky wrote:If you get a chance, I'd be interested in hearing a review of libRocket. I know your project used to use CEGUI - what prompted the change? What is working out better for you?
Well the main reason for looking for an alternative to CEGUI was that I felt building new menus and modifying old ones was too time consuming. I was adding widgets in by editing the .layout files manually. The problems with this are:
- Adding a new widget typically takes up at least 5 lines of XML (depending on the type)
- You need to explicitly specify the position of the widgets, which is very time consuming especially if you need to shuffle around existing widgets to make space.
Secondly the whole theme system seems quite long winded to define (the default .looknfeel file is 4000 lines long). I looked at it briefly and decided it would be too much effort to define my own. That leaves you with just modifying the existing imageset which is quite restrictive because you can't change any of the dimensions.
Finally there is not much to optimise rendering performance in CEGUI, but it seems that crazy eddie is back in town and trying to address that.
So I looked around for alternatives and decided to take the plunge with libRocket. So far I'm very happy with libRocket, they have excellent support on the forums and good documentation. I've had a response to every single of my questions usually within the same day. The library is quite new so there may be odd features missing simply because they hadn't thought of people trying to do certain things. But overall they have a very solid framework and its often small details that are missing. Any features that are missing will probably get implemented very quickly. They have already implemented several features on my request despite the fact that I'm on the Free license

.
In terms of the issues I had with CEGUI, you define menus and widgets using an HTML-like description. They call them .rml files, good things about it are:
- Each widget typically takes up 1 line of code
- You don't need to explicitly specify position (although you can if you want), they get aligned next to each other automatically
The theme system is also much easier to deal with, they are defined with a syntax similar to CSS except they are called .rcss. I have defined my custom theme in 700 lines of code which wasn't so painful. I did it step by step modifying 1 widget at a time.
The good thing about the theme system combined with the fact that you don't specify widget positions explicitly is that for example if you decide to change the graphics of your button such that it's size increases you won't have to redefine all your menus adding extra space between your buttons. So the defining of layout is almost completely separated from the theme definition.
I'm really liking the Python interface too, I'm quite a big fan of the Python language which probably helped sway me towards libRocket. I can't compare this against CEGUI's LUA interface because I never got round to using it. I should point out that I knew pretty much nothing about HTML and CSS before starting with libRocket, so it's not just for web junkies (and you might welcome the opportunity to learn something about BLOCKED).
On the down side, as far as I can tell there isn't a lot in terms of rendering optimisation either but that may be something that I can work on myself. Although I would guess the performance is better than say Navi.
Anyway I better stop there before I keep rambling on for pages.