• Advertisement
Sign in to follow this  

Gui Libraries?

This topic is 579 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've looked around online and there seem to be plenty of GUI libs but there dosnt seem to be any real consensus on what is "a really good" game GUI lib. Wondering if you could recommend any that would integrate well with a game engine.

 

Preferences:

  • C++ only (no XML/CSS/HTML stuff)
  • Free
  • Good performance
  • Lightweight
  • Easy to integrate (not copius amount of code to setup a simple control)
  • Low amount of dependencies
  • Open source
  • All the usual UI controls (buttons, drop-down menues, text rendering, etc)
  • If possible, ability to provide custom rendering

Any recommendations?

Share this post


Link to post
Share on other sites
Advertisement

Thanks for the suggestions. Both look interesting.

 

For building tools and debug utilities I'd most definitely recommend Dear ImGui. For in-game menus and stuff you might want to do some custom rendering/handling, but that's usually not all that complex.

 

Why is that so? What is the limiting factor for using it in a game?

 

Also, what is the reasoning behind using immediate-mode style? The way I see it is to collect all these commands and run them in a batchjob in my renderer, directly into the backbuffer after all 3D-rendering is done. Not sure if immediate-mode complicates stuff in that case.

Edited by KaiserJohan

Share this post


Link to post
Share on other sites
Why is that so? What is the limiting factor for using it in a game?

It's mostly designed to easily create tools/debug utilities where appearance doesn't matter. It's possible to change colors, fonts, sizes and the likes, but there's only so much you can do with that. Most in game UIs have a lot more flare and animation to them, so you'll want to handle these differently instead of forcing them to work within the confines of some library.

Edited by Mussi

Share this post


Link to post
Share on other sites

A bit of shameless self-promotion, if you'll allow me, but I'm the creator of KiWi: https://github.com/mobius3/KiWi

 

Its a C89 Widget-based GUI library. It uses SDL for events and rendering, but allows for you to specify a render driver other than SDL. Controls are painted using tilesets so you can switch your application style in runtime. I have also successfully compiled it to Android.

 

It is not complete, though: It doesn't have all the controls yet (e.g, it does not have a combo box), event handling is still very dependent on SDL events and a couple of other things that I want to change in the future.

 

You can see some code examples in the repo.

Edited by lgfreitas

Share this post


Link to post
Share on other sites

Thanks for the suggestions. Both look interesting.

 

For building tools and debug utilities I'd most definitely recommend Dear ImGui. For in-game menus and stuff you might want to do some custom rendering/handling, but that's usually not all that complex.

 

Also, what is the reasoning behind using immediate-mode style? The way I see it is to collect all these commands and run them in a batchjob in my renderer, directly into the backbuffer after all 3D-rendering is done. Not sure if immediate-mode complicates stuff in that case.

 

This is exactly what dear imgui does. It generate command buffers to render later. It is really simple to integrate.

"Immediate-mode" refer to the api style it's not related to the way you would access your GPU (it doesn't access your GPU at all).

 

About the styling limitation, as Mussi pointed out it wasn't designed to be very skinnable.

My opinion is that lots of UI _pretending_ to be skinnable are still not fit for high-quality in-game UI. What people refer to as "skinability" encompass lots of usability issues, controls, animations. Replacing a few visuals is merely 10% of what you'll need if you want a beautiful game ui. Few classic UI toolkits are great enough to provide in-game quality, unless you want your game UI to look like a 2002 shareware.

 

For in-game UI just bite the bullet and write custom code IMHO. it's actually fairly easy, the needs for in-game UI are much simplier than for tools, and they are more custom.

Edited by ocornut

Share this post


Link to post
Share on other sites

Hi,
if you are using openframeworks, then maybe you want to use my gui library:
 
It is in the material design and supports different controls, like buttons, menus, dialogs, sliders, etc.
 
I would be very glad, if someone is using it in theyr games ^^

ofxMaterialUI

 

The preference in this thread is for free librarys, which I totaly understand. For this addon, I have decided to sell it for 10$, which is in my opinion a fair price. To show the developer that he values his product and the price shouldn´t be a problem even for hobby projects.

Edited by WowItsDoge

Share this post


Link to post
Share on other sites

For some reason Openframeworks never got much coverage here, which is a shame because it seems like a very capable toolkit.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement