views:

205

answers:

4

I've been coding for a while now and would like to start looking into programming games. I know the industry's standard language is C++, for 3D graphics the main choice is between Direct 3D and OpenGL, but what is the most widely used GUI framework? I'm currently on a Mac so if native Windows API is the answer, then what is the cross platform choice?

To be clear, I'm not looking for people's favourites but simply what the common or standard game industry's choice is so that I can learn and familiarize myself with it.

Thanks, Spencer

+3  A: 

I'm sorry to say but there isn't one. Every game wants a special looking ui and there are very few public ui frameworks for d3d/ogl to boot (and the ones that are customizable enough are too slow).

Your best bet is to sit down and think a little about your ui, draw every possible ui widget on a piece of paper, try to look at what you can eliminate (you really really really want to keep it as simple as possible) and then start from scratch and implement what you really need from the ui.

When I did this, I tried to make it easily extensible, with resizable dialogs and Swing-like containers that align the controls for you, really cool in theory but it made implementing it a nightmare, took me months to get it right. Stick with the basics and you should be fine!

Blindy
+4  A: 

I don't think there is any framework in particularly wide use. Inside the game application, we tend to roll our own UIs, or use the ones that came with the engine.

Games tend to have lots of custom art and animation which are difficult to implement with general-purpose widgets; and moreover most toolkits don't play nicely with D3D or OpenGL, or have good ports to the Xbox and PS3. So you will see a lot of scratch-built UI implementations that have widgets ultimately making direct draw calls for textured polygons and font glyphs.

Outside of the game in the "glue screens", ie the installer and other non-D3D parts of the app, typically we just use the native API for the operating system in question, ie Cocoa or (ugh) MFC.

Crashworks
+5  A: 

Scaleform is used in a lot of AAA games. Unfortunately, it comes with a price-tag to match! It basically lets you develop the UI in flash and then import it into your game (since designers are usually quite familiar with Adobe's tools, this makes things pretty easy for them).

For open-source solutions, there are actually quite a few. CEGUI is quite popular (though it tends to suffer from "kitchen sink" syndrome - in that it has everything but the kitchen sink). I've also seen GLO and Awesomium (which is actually pretty interesting).

Other than that, most game engines (e.g. Unity, UDK, etc) have their own built-in GUI frameworks.

Dean Harding
How are Scaleform's perf and memory characteristics? The last time we looked at it, it seemed too bulky to justify the price, but if Ubi and EA are using it so widely maybe it's improved.
Crashworks
I've never used it myself either, but their client list is rapidly growing.
Dean Harding
@Crashworks - same experience for us plus their dev support was a little sporadic. It was also very unoptimised on PS3 but that was a few years back. Would be interested to know if it's improved since then.
zebrabox
Given the number of games that have shipped using Scaleform, I think it suffices to say that it's good enough. ;) I've never used it directly, but like any tool I think there are things you should and should not do.
dash-tom-bang
Ah, but in this business you win Christmas by being better than good enough!
Crashworks
@Crashworks: that is demonstrably not true. You win Christmas by hitting your date (which is easier if you're using technology that's shipped hundreds of games) and with good marketing. Ultimately it's not the UI that sells the game, anyway.
dash-tom-bang
Plus, tell me how many "homebrew" UIs look as slick as the ones at the bottom of this page? http://www.scaleform.com/products/gfx. Alas- I've just discovered that SF doesn't run on the Mac, so the answer content is correct despite missing the OP's question a bit.
dash-tom-bang
Unless you can get a Scaleform trial version (which is very difficult ...), it'll be very hard to make AAA games UI.
Ars
+3  A: 

http://librocket.com/ is a really good UI toolkit. it uses html/css layout verbage to describe your windows and styles, and allows you to do the rendering in whatever system you choose.

We chose it over scaleform because of the flexibility it gave us to allow client ui mods.

Steve