I'm kind of at a crossroads in my game and I'm looking for input from people who've been here before.

My game is a cross between RPG and RTS strategy and the main panel uses an lwjgl display for performance reasons. Ultimately, there will be several quite complicated windows required. For example: a window to manage the party's inventory or one to buy and sell items between a trading caravan and a city's marketplace. A good portion of this game will be heavily economy-based i.e. lots of data and I foresee the need to use sophisticated GUI elements including collapsible trees and tables.

To prevent myself from having to re-implement a full windowing system in OpenGL I've decided to use a mixture of Swing and an lwjgl display. Thus the game will have a MDI (multiple-document interface) i.e. multiple windows.

Now I'm wondering if I'll regret this later on. Would it be better to do everything in a single lwjgl frame? That is either use a pre-existing OpenGL windowing lib or create a custom one for my game. The graphical style is quite simple and I'd like to keep it that way.

I've taken a look at TWL and it looks pretty sweet. However there are a few concerns I have. It doesn't integrate properly with the rest of the system e.g. the system clipboard etc. And while the existing UI elements look good they're pretty simple compared to their Swing counterparts.

If I went with the MDI version and needed some very basic UI elements in the main lwjgl window then how tricky is it to write a UI toolkit? I suppose there's nothing stopping me from using both TWL and other Swing windows...

Swing doesn't mix very well with OpenGL -- it's really only useful for editors/toolsets IMO.

Writing your own GUI library is always an option, but if you need things like complex text widgets, lists/trees, tables, layout managers, animations, etc. it will amount to a lot of work. Unless you have good reason to reinvent the wheel, you should just use something like TWL. It's efficient, highly flexible and includes a very useful theme/widget/font editor.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org