Game structure/game ui

Started by luuse, April 08, 2010, 16:15:56

Previous topic - Next topic



I'm making a game using LWJGL for a course I'm reading and I have a basic rendering and update loop done and can display my game objects and move them around and now I need to make the surrounding UI (menus for starting the game and such) but I'm not sure how to procede/structure it.

My needs are pretty basic (i need to present some choices and accept text input) so I could roll my own but I feel that there should be another solution? I've been looking a bit at swing and swt, does anyone have any experience with incorporating them into a game? Can i overlay swing/swt components over a opengl rendering in some way?

There are plenty of information on game loops/rendering but none on how to structure the game with a ui in a good way.

What are your thoughts?



there's plenty of LWJGL Gui's you can use. I'd recommend TWL, plus if you need help using TWL you can get it either at the TWL Forums or real time help on the LWJGL IRC Channel (

Other options include Nifty GUI, Feng Gui, Thingle (thinlet port).


Wow, great, thought i had looked everywhere :(. Think I'm gonna go with Nifty, it seems to match what I need pretty well. Thanks for the help!



I'd like to put this question forward again, but with lwjgl 3. Any lwjgl 3 guis?


OK, it turns out this is one of those things that's so obvious you'll facepalm. You just take the MVP transform out of your vertex shader and use hard values between -1,1. ... So Simple.

Making it interactive though.... that's another matter.