Jump to content
  • Advertisement
lunamos

Any recommendation on GUI solutions for games?

This topic is 429 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

Beginner in the field here. I'm trying to implement a grand-strategy engine from scratch using C++ and DirectX11. It turns out that the efforts implementing GUI part itself is already much beyond my consideration. Imagine the GUI of Civilization V or Crusader Kings II, that's what I want.

I know some AntTweakBar stuff, but these are mostly used in testing some rendering applications right? Can it also be good in games?

What are some common solutions for most indie games? (Implementing a scroll slider, a listbox, a tab control, for example)

Thanks very much.

Edited by lunamos

Share this post


Link to post
Share on other sites
Advertisement

Not an indie, but my guess is that most indies will grab a random UI library from a shelf, and use it. You don't make money from a UI implementation, you make money from good game play, so that's where a wise indie will spend his/her time.

You have a choice here. You can dive into making a UI library (which is a fun subject on its own), or grab something that exists, and spend time on other parts of your game (I would recommend you start making a game rather than an engine. It's an order of magnitude simpler, yet it contains many parts of an engine. In that way, you get a better idea of what an engine should contain or provide, which will eventually improve the quality of it.)

Edited by Alberth
Most indies are considered wise rather than wide

Share this post


Link to post
Share on other sites

Hey there, I've been using AntTweakbar in my game and it is mainly a tool development UI. I get the occasional framespikes from it, and the api doesn't allow custom textures for your panels, so I wouldn't recommend it. If you fear the bloatedness of custom ui libraries and want to make your own, start small - The most fundamental ui elements you can implement are buttons, textboxes and ui images coupled with a parenting system.

Share this post


Link to post
Share on other sites

If a library will do what you need it to do, then use one. If not, do you know enough about the concept that you can modify the library to suite your needs ? Do you want to learn how to code the particular library yourself which also means you can specialize it to cater for your precise needs.

 

Personally I write my own GUI code because I like doing it, it also benches me in thought for a few hours, how can I make my GUI unique, appealing and relevant to the game that I'm making. While keeping it easily navigable and clear. 

But there are good looking libraries that will do what you need them to, And what I like is that the library devs often take suggestions on improvements because in the end it means their products will be better so they'll get more sales. 

Share this post


Link to post
Share on other sites

In the grand scheme of things, games have often quite simple GUI requirements. I.e a game I recently completed had:

  • Text
  • Button
  • List Box
  • Check Box

Granted, for a RTS you might have more complex requirements but for that you will likely need custom GUI components anyway.

One alternative is using a "proper" Gui library such as wxWidgets, Gtk+ or Qt. Then use that for the buttons and lists but then render the game in some sort of wxGLCanvas (if using wxWidgets and OpenGL).

Share this post


Link to post
Share on other sites

Yeah, Qt has been around a while and is a powerful library.  Other things to try, if you're desktop only, is doing XAML interop.  (or UWP I think you can do C++  and XAML)  -- though I don't see many games do that, mostly level editors.  You might also try Scaleform, though I don't think that's free.

For a game with a complex UI that you want to scale nicely, I think I'd avoid trying to rewrite the wheel for every single thing.  

Share this post


Link to post
Share on other sites

3rd party UI libraries have always been in a pretty poor state. Someone wrote a blog entry about this recently. And as more and more people use existing engines, this is unlikely to change, because Unity and UE4 users will use the built-in UI.

Some people used to do okay with LibRocket, but that's not seeing much love these days.

CEGUI, formerly Crazy Eddie's GUI, has been widely used over the years, and widely criticised over the years. But it's certainly capable.

TurboBadger looks good. Never used it myself, or heard of anyone else that did, so tread carefully.

Pros sometimes use Scaleform. They don't even list a price, so you probably can't afford it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!