What UI system we need?

What UI system we need?
0.0 0

#21

Thanks @Jgod.


#22

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.


#23

ListView moving so strange!!!


Cocos2d-x UI event callbacks
#24

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.


#25

+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:


#26

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?


#27

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?


#28

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:


#29

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.


#30

I would try to add support to QT in all modes. There is no need to reinvent the weel. IMO


#31

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


#32

And i think it is not hard to use other sound engine in cocos2d-x.


#33

@naghekyan
Thanks. We will fix it.

@owen
Please check the issue.
Thanks.


#34

@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)!


#35

I am thinking supporting existing mature UI system, such as NoesisGUI. Now the UI system is heavily used in Cocos Studio.


#36

@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?


#37

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.


#38

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…


#39

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 ?


#40

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