More releases!

I just realized I forgot to announce the releases I made at the beginning of the month! Oops. This poor, neglected blog.

I updated all of my projects, and for the most part it was a very minor release that fixed an installation bug in Linux or updated the translations. Of course, FocusWriter had a few more fixes than the rest, but that is to be expected as it is a much more complicated program. And Tanglet actually had a feature release, thanks to Markus Enzenberger. If you have not yet updated, enjoy!


Releases galore!

Over the past week and a half, I have made releases for all of my projects. Most of them were pretty minor, and just amounted to updating the translations (and fixing an issue where the Qt-supplied translations were not being properly loaded). Packagers will now need to depend on lrelease, because I no longer include the precompiled binary .qm files.

The projects with actual feature releases were CuteMaze, Hexalate, Tanglet, and Tetzle. For the most part, the features added will not be obvious unless you have a 4K monitor, because the biggest thing I added was support for high-DPI displays. I did also finish moving my projects to be Qt 5 only, and to use C++11.

As usual, report any issues you have. Enjoy!

Development version numbers

Now that I am switching to release branches I am finally going to also tackle something that has always bothered me but I’ve never taken the time to solve: the development source code has the same version number as the most recent release. I have always wanted it to be some sort of automated number, but I wasn’t sure what I wanted it to be. And I didn’t want to have to update it myself with every single commit.

At first I had wondered about a number that gets incremented every time you compile the project, but I quickly realized that was a pointless thing to track. I may build a project 5,000 times and have a huge build number, but someone else might download the source and compile it only twice. Same source code, different version number. That’s frankly pretty silly.

Instead, I got inspired by the idea of using the git revision ID. It is obviously unique for each commit, and it identifies the specific source code for everyone. Of course, you can’t embed the revision ID because it is a hash that is created of the source code that you’re trying to embed it in. A hash that contains itself? Impossible! Of course, all you have to do instead is simply ask git for the revision ID, and pass that as a definition to the compiler:

VERSION = $$system(git rev-parse --short HEAD)

The source code also needs to make use of the new compiler definition:


This means that I finally have an automated version number for the development source code. I’ve only updated Kapow so far, but I am going to make this change to all of my projects.

Minor Tetzle release

I just released Tetzle 2.0.1, a small bugfix release. Primarily this release fixes a crash for users with older OpenGL hardware, as well as a few other minor bugs. Thanks go to Markus Enzenberger for a German translation, and Artem Krosheninnikov for a Russian translation. Enjoy!

The end of PowerPC support

I should have announced this sooner, but better late than never I suppose. I will no longer be creating new PowerPC builds of my programs. There are many reasons, but the biggest two are that my iBook G3 finally gave up the ghost, and that Qt has dropped support for PowerPC. I know that this is an inconvenience for some of my users, and I am sorry about that. Still, I hung in there as long as I could, but Apple has moved on.

A short story about source code comments

A bug was reported in Tetzle, and the reporter helpfully tracked down why it was happening but was not sure what the purpose of the offending code was. I took a look at the code and said, “Beats the hell outta me!” I’m lazy, so of course it was not commented. I traced it through git all of the way to the very first release, and then had to track down my ancient notes about what the purpose was (it turns out Tetzle crashes if you delete the image of the current game, so it was preventing that but not clearing it on launch — kind of obvious, really). I fixed the code and added comments so that I would know what the purpose of that code is if I ever wonder in the future. The moral of the story is: comment your damn code, you’ll need it someday. Of course, I doubt I will be diligent about that, since I’ve run into this exact same situation before. 😛

Huzzah, a new release!

It’s taken longer than I wanted, but I have finally finished Tetzle 2.0! There are some big visual changes from the previous version (drop shadows, piece bevels, adjustable background color…), and some smaller ones like a brand new dialog for choosing games. I didn’t like the disconnect between the new and open game dialogs, so I merged them into a tabbed dialog. Also, I rewrote the entire graphics layer, along with the code to detect which pieces to attach and which pieces to push when you drop a piece. Finally, thanks go to Sergiy Gavrylov for adding a Ukrainian translation. I hope you enjoy this release as much as I did making it!

Update on supported Tetzle puzzles

It actually turned out to be a lot easier to support current puzzles than I was anticipating. I solved the bevel issue by simply disabling bevels for puzzles created before piece-based bevels were added. Plus, the file format had not changed as much as I had thought, so they were much simpler to convert than I expected. Current puzzles will still be supported in the next Tetzle after all!

A brand new look for Tetzle!

I decided earlier this month that I still wasn’t satisfied with the way Tetzle looked. For one thing, the pieces were too small when zoomed all of the way in. I also realized that I did miss the bevels. However, I was never very happy with the old bevels, so I designed new ones for the entire piece. Plus, I decided that a new color scheme was in order, since the white background was so blinding. The result of all of these changes can be seen in this screenshot:

Development tetzle

I had to change the puzzle file to track what bevel each tile has, so old puzzle files can no longer be played with the new Tetzle. In fact, the file format has changed so much that puzzles from version 1.2 can not be played in the development version. I am thinking about trying to add a converter, but a big problem is that there is no way of knowing what bevel a tile is supposed to have.

Along the way I also decided to improve my use of OpenGL. I had been using the incredibly slow and deprecated immediate mode, because all of the starter tutorials online told you how to use that. I now use vertex arrays, and will use vertex buffer objects and vertex array objects if they are available. And, to top it off, I also added basic shaders to imitate the fixed function pipeline so that Tetzle will run on OpenGL 3+ without compatibility mode.

Tetzle is alive!

Good news Tetzle fans: your long wait for updates is finally over! I have been working on a variety of enhancements to the game during the past several days, and all of them are now available in the git repository. Some of them break backwards compatibility with the current release, so the next version of Tetzle will be 2.0 instead of 1.3.

The biggest visual change is the replacement of the beveled edges (which, to be honest, I never liked that much) with drop shadows! I originally wanted to use drop shadows, but at the time I couldn’t think of a fast way to add them. It turns out that a simple trick is all I needed: render blurry squares under the outside tiles of a piece. 🙂

A related change is the fact that the tiles are now always 32 pixels wide and 32 pixels tall; never larger and never smaller. This means that if you want to see a larger version of the image, play with more pieces! Smaller boards now use less video RAM, so they should play better on slow computers.

I have also improved the algorithm that creates the puzzles themselves. The current version of Tetzle uses a hack of building puzzles out of groups of 8×8 tiles that make interlocking pieces. The new and improved version of the code creates a puzzle of fully interlocking pieces. It even respects aspect ratios to a much better degree than before. In fact, if the aspect ratio of the image is 4×3 it will always use the entire image, otherwise it will use almost the entire image.

Worry not Tetzle fans, these are not the only changes coming; stay tuned for more updates! In the meantime, here is a screenshot of the development version of Tetzle: