LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Game structure/game ui  (Read 7984 times)

luuse

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Game structure/game ui
« 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
Logged

kappa

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1309
Re: Game structure/game ui
« Reply #1 on: April 08, 2010, 16:49:23 »

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).
Logged

luuse

  • Newbie
  • *
  • Offline Offline
  • Posts: 3
Re: Game structure/game ui
« Reply #2 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
Logged

josephdoss

  • Newbie
  • *
  • Offline Offline
  • Posts: 8
Re: Game structure/game ui
« Reply #3 on: August 25, 2017, 22:28:47 »

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

josephdoss

  • Newbie
  • *
  • Offline Offline
  • Posts: 8
Re: Game structure/game ui
« Reply #4 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.
Logged