Java Swing OpenGL GUI

A Java Swing GUI running inside OpenGL

Hoplon Infotainment Frameworks / Professional

Taikodom is a huge game. Like almost every MMO, it needs several GUI features and components that could take a lot of time to do. It wouldn’t be smarter to use an already made and proven GUI system instead of creating a new one? Sure it is.

At that time, Taikodom was a huge game written in Java using OpenGL to render its graphics. To make the GUI, a team of very experienced developers created a framework that, despite its performance it was very hard to use and extend. In that scenario arises this project: the Java Swing OpenGL GUI (it have no official name, so I used a very descritive title).

The project was audacious: make the Java Swing run inside the game using OpenGL keeping a playable performance. No one had achieved this at the time. At least not with our performance requisites. So the lead programmer decided to make it.

To achieve a better pipeline, we add a new feature to the table (inherited from the old GUI system): the screens should be made with xml and css. That part was very hard to make, but it was very cool to see the results. On top of that, under the shadows, working after the work hour, I created an editor to these files where the GUI designers could create their screens with no programmer. It was very rough editor, few features and lot of work, but helped to create the screens faster.

This was a very hard project that I helped. Nothing was easy. At the time, I never had used Java Swing in my life. So, it was a walk in the dark almost every day at the beginning. Digging into Swing code, trying to understand why some decisions was made, finding some pieces of code, replacing them, extending them, debugging them.

The project was very successfully and for sometime, the Taikodom GUI was entirely created with Swing components. With this very challenging project I learned a lot about GUI and several beatiful (and ugly) things that Swing does on the code. Basically, we changed the way Swing draws itself and extended every component that we need in the game. It was a hard and painful job, but the effots worth greatly. The Taikodom released in October 2008 have the Java Swing OpenGL GUI.

This was the Taikodom GUI until everything was changed to Unity3D®, where we use our learned lessons to make a better GUI inside the new engine.

Skill points earned

Tools Programming
GUI Programming
Design Patterns
Java Swing
Java