May you can integrate/learn from librocket http://librocket.com/
libRocket is the C++ user interface middleware package based on the HTML and CSS standards. It is designed as a complete solution for any project’s interface needs.
libRocket uses the time-tested open standards XHTML1.0 and CSS2.0 (while borrowing features from HTML5 and CSS3), and extends them with features suited towards real-time applications. Because of this, you don’t have to learn a whole new proprietary technology like other packages in this middleware space.
It’s also using the decorator pattern, which was suggested by Mazyod
Or is something like scaleform http://gameware.autodesk.com/scaleform needed/wanted?
Which is basically rendering an Adobe Flash Movie.
I do think leveraging an already popular or commercial solution could be very fruitful. It’s just a matter of whether it’s worth tying ourselves to their API. With things like Spine coming out ahead with strong support, I think it’s worth considering.
+1 for libRocket http://librocket.com/wiki/frontend/features
No need to reinvent how to do UI, Web standards are there for us to use.
Cross-platform and CMake based is what cocos need I think.
Disclaimer : I didnt know about it, but it definitely looks interesting…
Another possible choice is CEGUI http://cegui.org.uk/features
It has been there for a long time and is used mostly in games.
I also has an editor now.
Disclaimer : I haven’t tried it yet, but I always wanted to
Yep. If it’s working and can be integrated easily into cocos2d-x, it should be used instead of re-implementing the wheel.
The only “bad taste” about it is the inactivity for a while now. But someone was suggesting, that they are just busy on their own games.
CEGUI, who does not know it, was used in some pretty successful commercial games.
Seems to be pretty stable.
Regarding “reinventing the wheel”. Wasn’t it announced, that cocos2d-x is getting a new sound engine?
Same applies here: Is it really needed or is integrating middleware the better approach?
CEGUI seems too heavy for mobile games.
About Audio engine, what we want to have is
- it is easy to use
- it will not increase application size, especially on iOS and Android
- it should be cross-platform
- it is an enhancement version of old one
Is there a good sound engine can meets these requirements?
The first sound engine that comes into mind, regarding those requirements, is fmod http://www.fmod.org/
It’s one of the best sound engines/sound middleware out there.
They recently changed their licensing requirements. They now have a FMOD Studio Free For Indies! License – Budget under $100k USD but they have a credit requirement in the docs or on screen.
I don’t know if those restrictions are against a consideration.
- Usage: It’s very easy to use. Playing sounds is as simple as with
- Application size: The mobile lib for example is about 1.5MB in size.
- Cross platform: Nearly every platform is supported: Windows, Linux,
Mac, iOS, Android and consoles
- Enhancement: It has plenty of features. From streaming music over the
net, to DSP effects and 3D sound.
- Comes with an editor: Think of CocoStudio for sound/music
and even a free open source one:
Regarding fmod and wwise is like Pepsi vs. Cola
Please see this: I have opened a feature regarding to TextBox text customization http://www.cocos2d-x.org/issues/5346
Also about UI there is a problem with RelativeLayouts. The example in wiki does not work. Here is the detailed description of the problem: Relative Layouts don't work on cocos2d-x 3.1? Please fix it too.
I would try to add support to QT in all modes. There is no need to reinvent the weel. IMO
Thanks for the information. fmod is good, but it is not free. And i think it is not problem to use it by yourself. Audio engine is not needed when developing cocos2d-x games. You don’t have to use it if you don’t like it and use the one you like.
And i think it is not hard to use other sound engine in cocos2d-x.
@zhangxm I have found the problem with the relative layouts. It is necessary to change
layout->setSize(visibleSize);. Please update the wiki: http://www.cocos2d-x.org/wiki/Containers
And thank you for considering to support
TextBox text customization features (http://www.cocos2d-x.org/issues/5346)!
I am thinking supporting existing mature UI system, such as NoesisGUI. Now the UI system is heavily used in Cocos Studio.
@zhangxm you want NoesisGUI to replace all existing UI classes in cocos2d-x or you want to use them as an additional way of creating UI?
Just my 2 cents to the audio stuff: Of course you can’t use fmod because it’s not free but nevertheless the audio part is a big part which is important for developing games. It’s not only the UI what counts. And yes, it’s of course able to use a different audio engines. But I don’t want to do it, that’s the reason I am using cocos2d-x
And now the UI Stuff:
I would also like to see a UI System with a different approach (see the examples above this post). Would be also extremely nice if the system is based on a widely spread language like HTML.
While developing and improving the new system cocos2d-x could support both systems (legacy and shinyUI ). But that would be a lot of work.
About UI :
How about that one : http://feathersui.com ?
Apart from that, the only mature UI ( easily embeddable in a game ) based on markup language that I could find are CEGUI and libRocket.
If it s too heavy we probably need to have a look at smaller UI libraries. But I dont know of any one that is mature and that we can easily integrate.
I used Guichan before for the same reasons. It s quite light and it works fine, but it s not easy to integrate ( you need some kind of frontend code like that https://github.com/asmodehn/sdlut/tree/master/Guichan_SDLut_FE/include/guichan/sdlut - this project is old, not even sure it compiles anymore ). Also it seems a quite dead now
some people seems to have used http://www.tecgraf.puc-rio.br/iup/ with some success.
Even if we cant find a perfect UI library for cocos, I would prefer to reuse/maintain/fork/takeover an already existing one (libRocket?), that can work with other engines than cocos, instead of starting again a UI framework from the beginning, that will work only on cocos engine…
As an additional way.
But i have to discuss it with other guys.