LWJGL Forum

Programming => General Java Game Development => Topic started by: luuse on April 08, 2010, 16:15:56

Title: Game structure/game ui
Post by: luuse on April 08, 2010, 16:15:56
Hi

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?

Regards,
Andreas
Title: Re: Game structure/game ui
Post by: kappa on April 08, 2010, 16:49:23
there's plenty of LWJGL Gui's you can use. I'd recommend TWL (http://twl.l33tlabs.org/), plus if you need help using TWL you can get it either at the TWL Forums (http://slick.javaunlimited.net/viewforum.php?f=18&sid=8c2d6d6229e9b6988fd302de7dfd4c46) or real time help on the LWJGL IRC Channel (freenode.net)

Other options include Nifty GUI (http://nifty-gui.lessvoid.com/), Feng Gui, Thingle  (http://slick.cokeandcode.com/thingle/)(thinlet port).
Title: Re: Game structure/game ui
Post by: luuse on April 09, 2010, 10:11:52
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!

Andreas
Title: Re: Game structure/game ui
Post by: josephdoss on August 25, 2017, 22:28:47
I'd like to put this question forward again, but with lwjgl 3. Any lwjgl 3 guis?
Title: Re: Game structure/game ui
Post by: josephdoss on August 28, 2017, 15:30:42
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.
https://gamedev.stackexchange.com/questions/56817/drawing-a-hud-above-3d-with-shaders-in-gl

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