Programming > General Java Game Development
Game structure/game ui
(1/1)
luuse:
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
kappa:
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 (freenode.net)
Other options include Nifty GUI, Feng Gui, Thingle (thinlet port).
luuse:
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
josephdoss:
I'd like to put this question forward again, but with lwjgl 3. Any lwjgl 3 guis?
josephdoss:
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.
Navigation
[0] Message Index
Go to full version