Sign in to follow this  
SeraphLance

In-Game GUI Libraries for C?

Recommended Posts

What sort of options are there these days for this sort of thing?  I'm looking for a C-compatible API (or D, since that's technically the language I'm using), and the field seems a little sparse.  Everyone seems to have fallen in love with IMGUI-style libraries.  I can see why; mocking things up with one (imgui in particular, with a somewhat-clunky C binding) was a breeze.  However, the presentability of the result leaves a bit to be desired.  My game is fairly UI-driven, and I'm looking for something I can skin and animate for that purpose, not so much in the way of tools development.

 

The place I last worked at used an in-house solution, and it seems like many commercial games use scaleform.  Almost everything else I've seen is written in C++, like CEGUI and LibRocket.  Is there anything out there that supports C?  Should I just build my own?  I've heard that's an extremely laborious task.

Edited by SeraphLance

Share this post


Link to post
Share on other sites
I use D as well. If ImGUI is not your thing, I'd recommend writing your own. Depending on what components you need, it doesn't have to be that complicated.
There might be other alternatives out there as well, but I don't know of any other but ImGUI..

Edit:
Maybe one of should start an open source project for this? would be nice to have something purly written in D :)

Share this post


Link to post
Share on other sites

Maybe one of should start an open source project for this? would be nice to have something purly written in D :)

 

If it comes down to that, I probably will.  I really hope it doesn't though.

 

 

There's Nuklear. If you want something you can show in your game, you'll probably want to invest some time into creating a skin for it.

 

I see.  I'd written it off as being in the same bucket as IMGUI and for tools development.  I'm not sure why as I'd seen some of those screenshots before.  I'll give it a look, thanks.

Share this post


Link to post
Share on other sites

There are some static and dynamic D bindings for Nuklear already, so you can jump right in. 

 

The dynamic binding is actually only like 25% finished, and the static binding has given me all sorts of pain due to the the COFF/OMF thing.  As much as I love the language, I absolutely hate the linker in the toolchain.

 

Since both are based on an outdated version of nuklear and aren't getting updated, I decided I might as well just roll my own bindings using your article and the official sources as a reference.  Thanks for the heads up though.

Share this post


Link to post
Share on other sites

I don't touch the OMF stuff anymore. With DMD, it's all -m64 for me now. That's what prompted me to add support to some of the Derelict packages to be used as static bindings -- it's feasible now without the OMF/COFF headache. Unfortunately, until DUB supports -m32mscoff fully, it's still an annoyance for 32-bit.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this