What UI system we need?

Thanks @Jgod.

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.

1 Like

ListView moving so strange!!!

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 Like

+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.
Maybe it will even be possible to use the same tools / UI code for C++ and javascriptā€¦
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 :slight_smile:

1 Like

Yep. If itā€™s working and can be integrated easily into cocos2d-x, it should be used instead of re-implementing the wheel.

@Asmodehn
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.
As long as javascript can deal with RML(there are already .js implementations to generate HTML out of RML), there is no problem to share the tools/UI code between different languages.

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
    cocos2d-x now.
  • 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

But of course there are other ones as well that would meet the requirements. E.g. https://www.audiokinetic.com/products/wwise/
http://www.radgametools.com/miles.htm

and even a free open source one:
http://www.crickettechnology.com/

Regarding fmod and wwise is like Pepsi vs. Cola :smile:

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

@iQD
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.

@naghekyan
Thanks. We will fix it.

@owen
Please check the issue.
Thanks.

@zhangxm I have found the problem with the relative layouts. It is necessary to change layout->setContentSize(visibleSize); to 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.

1 Like

@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 :stuck_out_tongue_winking_eye:

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

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ā€¦

About supporting existing mature UI systems, how about supporting http://berkelium.org/, or make it easy to use https://code.google.com/p/chromiumembedded/ for people who want HTML based UI ?

As an additional way.
But i have to discuss it with other guys.