Looking back at 5 years of TGUI

Today TGUI celebrates its 5th birthday. When it was originally released, I never thought it would get this far. I’m really happy to see that several people are using the library, which gets downloaded 3 times per day on average now. A lot has changed during these 5 years and I wanted to take the opportunity to look back at the evolution of the library.

The reason why I started this gui is a bit stupid actually. Five years ago I was still a noob in programming and when I wanted to write a game I just started writing the first thing that would be seen when the game started: the menu screen. I usually didn’t get much further than that. So I wrote some simple gui using the Windows API, DirectX and afterwards for SFML. The difference between them was that the one for SFML would end up containing a lot more than just buttons and text fields. I decided that unlike the earlier code that I kept for myself I would release this code because I couldn’t really find a gui library for sfml. Obviously SFGUI already existed but I somehow missed that it was already released. Looking back at the old posts I see that the current SFGUI topic was only created one month after I started TGUI and I must have missed that their old thread contained 11 pages and only looked at the first few posts in that thread where it was said that it wasn’t finished yet. If I had discovered SFML several months later I might have never published TGUI at all.

So after a few months of development, on 12 february 2012, I released TGUI 0.3 on the SFML forum (the original post no longer exists, it was edited later). The meaning of the “easy” part of the gui was mostly about the fact that I was a beginner programmer myself and the code thus wouldn’t have complicated stuff in it, something that is no longer true today. The library was still rapidly changing and patch releases arrived within days from each other. After a few months support for OS X and the first Form Builder were also added. The main issue of this version was that I didn’t know how to distribute it yet.

With 0.4 I started using git and cmake meaning that people could actually use this version without too many issues. The panel widget finally worked which made this the first version to have hierarchy in widgets. The version however still contained a lot of serious bugs. These days bugs are usually isolated and happen in specific cases, but back then you could have a crash just by creating a slider widget with the default theme and then moving your mouse.

When 0.5 was released at the end of 2012 I finally had a version that was worthy of being released. Many improvements were made and several widgets were added, including ChildWindow. When I started the gui library I told myself that the condition of having a 1.0 release was a working child window and I never expected to actually have one. But by the time 0.5 was released I still didn’t believe the library was ready to get a 1.0 release. Although I called it the first stable version back then, this is a title I believe should go to 0.6 instead as people trying to use 0.5 regulary encountered issues. There was one “big” game that tried using TGUI 0.5 but they eventually decided to rewrite their code and no longer use TGUI.

At the beginning of 2014, after a year of development, TGUI 0.6 was finally released. This is the version that I consider the first one to be stable. For two whole years this version has been getting patch releases, making it the version that has been the stable branch for the longest time. TGUI was finally getting used by a lot of people for small projects and I was seeing regular downloads. The major downside of this version is that, despite the fact that it was useful enough, it was lacking a lot of useful features. I tried using my own library once and I found that several things that I wanted to do were already in 0.7-dev but simply not possible in 0.6, so there was still a lot to improve.

The entire gui would go through yet another large rewrite. During these 2 years of patches in 0.6 I was of course working on the 0.7 version. Eventually 0.7-alpha would be released which contained tons of features that were lacking in earlier versions. This is also the version where experimental android and ios support were added. Unit tests were also introduced in this version as an attempt to find bugs earlier. TGUI 0.7 was supposed to become a version that was almost worthy of being called 1.0, but I realized that the planned changes would still take too long to implement. The downloads were about 50-50, half downloaded 0.6.10, the other half downloaded 0.7-alpha. Both options were not optimal. If you downloaded 0.6 then you were missing 2 years worth of features but if you would use 0.7-alpha then you would have to rewrite a lot of your code once I released 0.7-beta. So I made the decision to release 0.7-alpha as 0.7 and turn 0.7-beta into 0.8. This way people would stop downloading an outdated version and would have a version which receives compatible patch releases that doesn’t break their code. There was just one issue, there was a reason it was originally called alpha, it wasn’t finished yet. Although TGUI 0.7 is the best version so far, I dropped functionality by releasing it early, the main example being the form builder. TGUI has had a drag-and-drop form builder since 0.3.7 and now its gone. This why I’m still not satisfied with the current release, but this is an issue that I intent to fix with TGUI 0.8.

TGUI 0.8 will finish what was left broken in 0.7. The theme class and renderers will be improved, a much larger portion of the code will have unit tests and the Form Builder will be reintroduced. A .Net binding will also be available for those who want to work in C# instead of C++. TGUI 0.8 will basically be a version that is almost worthy of getting a 1.0 tag.