Is it a bug?

Posted on July 11, 2024, under Tetzle

I just recently made Tetzle zoom in and out on the mouse cursor. I felt that was much more natural than always zooming in and out on the center of the play area.

While I was doing so, I noticed that the code implied that was how it was already supposed to work. But it didn’t. And yet… when I looked far enough back… it did! Back with Tetzle 2.0 I rewrote the graphics handling and broke the zooming in on the cursor. Unintentionally. Ever since then, it has zoomed in on the center of the play area.

So… does that make this a bugfix for a bug that was 13 years old? Or a reintroduction of a past feature? 😛

Starting a new game in Tetzle

Posted on July 7, 2024, under Tetzle

I haven’t played Tetzle much in several years, despite the fact that I really enjoy jigsaw puzzles. It is probably one of my favorite pastimes besides reading. And programming. 😉 Because of how long it has been, I haven’t had to deal with starting a new game in Tetzle in a very long time.

And it is kind of confusing.

Mostly, adding an image for a new game was not obvious. To solve that, I spent way too long going down the rabbit hole of completely redesigning the new game interface before deciding that the current design just needed some improving.

The first thing that needed help was the image actions. Why are there no text labels? Just using icons alone was confusing and not very discoverable! And having them below the images made it extra hard to figure out how to add an image.

The second thing to go was the tag sidebar. Don’t worry, there are still tags! But they don’t need to be in such a prominent and confusing place. I instead made them into a drop down, where the last item is “Manage Tags…” and it brings up a dialog to modify the list of tags.

I also found not being able to add a new tag to an image while modifying its properties to be kind of awkward. I did try replacing the list of tags with just an entry where you typed the tags for an image, but that had its own issues. I decided to simply add an entry for new tags while modifying the image properties.

And finally, you could add multiple images but only remove them one at a time. Not very friendly! Now you can remove as many images as you want at once by selecting them and then clicking “Remove Image”.

Here is what it looks like with those changes:

Update new game interface for Tetzle

Much better, I think! Now I just need to play a bunch of new images to see how it feels in practice… After all, the best way to know if I have fixed the issues is to play games, right? 😉

Interface improvements for Tetzle

Posted on June 26, 2024, under Tetzle

Once I get into a project, I really get into it. I haven’t worked on Tetzle in many years, as I felt it was pretty much done. But I have been noticing things to improve now that I have replaced the graphics rendering.

Firstly, the statusbar is a mess! It has two similar bars with percentages next to them. One of the percentages is for how far through the game you are, and the other is for how zoomed in the play area is. Frankly, you don’t need to see the zoom percentage all the time (and it was very confusing to start a game and see “100%” down in the statusbar). So I removed the label on the zoom slider and made it a tooltip instead.

That was a good start, but I felt it could be better. I decided I would make the zoom slider’s purpose more clear by adding buttons around it for zooming in, zooming out, and zooming to the best fit. And then I realized I could continue to improve the statusbar by changing the game progress bar to include “complete” after the percentage!

While I was at it, I decided to tackle an unrelated but longstanding issue. Many players don’t realize you can scroll the zoomed-in play area by middle-click dragging it. Right click already rotates the pieces, so it seemed like a good compromise. Sadly, it is not very discoverable. Plus, most games use right-click drag instead of middle-click drag, so even if users thought about dragging the play area they would probably try the wrong mouse button.

I tried adding scrollbars, but those didn’t feel very “gamelike”. And if you wanted to move to the left, you had to move your mouse to the bottom and drag a scrollbar instead of just… moving your mouse to the left. They also made me feel very limited while playing, like the play area wouldn’t expand even though it does.

After some thought, I came up with a solution I am quite happy with: I added edge scrolling! It is very handy while playing, and I don’t think it is very intrusive. It is very intuitive to just mouse to the side and have the play area scroll in that direction. I even added the ability to increase the speed of the edge scrolling if you click on the edge while it is active. This doesn’t replace middle-click dragging, of course, but it is a very nice alternative.

Without further ado, here is the new Tetzle:

Showcasing the edge scrolling and new statusbar of Tetzle

Tetzle says goodbye to OpenGL

Posted on June 22, 2024, under Tetzle

Many long years ago I tried using QGraphicsView to make a simple puzzle game. But I found it to be unbearably slow, possibly because I wasn’t using it correctly. Who knows. So I decided to use OpenGL to accelerate the graphics. After all, OpenGL is all about accelerating graphics! And all was good.

Well, sort of. OpenGL is not the easiest to work with. And it changed a lot over the years, forcing me to mimic my use of the old fixed-function pipeline with the newer programmable pipeline. Tetzle’s code has always been a bit hard to debug because, well, again, OpenGL is not the easiest to work with. It has also caused many issues for users over the years that I have sadly not been able to solve.

Plus, it never really sat well with me that my simple 2D puzzle game used a graphics framework that is better suited to 3D gaming. Sure, you can accelerate 2D graphics with it, but it is overkill. Especially with modern CPUs. This is just blitting 2D graphics, for sanity’s sake!

So! Every few years I would think about porting Tetzle away from OpenGL, sift through the old code I have archived, look at the mess of the QGraphicsView version and think, “Maybe later.” And, of course, later never came.

Until now.

Because Qt 6.7 doesn’t work with the current Tetzle code. Well, it does if you run Tetzle as OpenGL 1.1 or 1.3, which is just absurd. And not supported everywhere, since it’s the old fixed-function pipeline that was dropped years ago. Instead of spending time fixing it, I decided: “Now. Now is the time to finally get Tetzle free from OpenGL’s clutches.”


I still didn’t like the idea of trying to clean up the ancient QGraphicsView code that bore absolutely no resemblance to the current game. And then I had a brainwave: why not just use QPainter? It has an interface close enough to how I was using OpenGL that I can reuse most of the current code, and everything should Just Work™. And… it does! 🎉

It is embarrassing just how easy it was to get Tetzle free from OpenGL. I should have looked at QPainter before, since I do use it for some of my games instead of QGraphicsView. Hindsight is 20/20, and all that. In less than 24 hours from the initial idea, I am pleased to say that future releases of Tetzle will no longer require OpenGL!

Welcome to my new website!

Posted on June 20, 2024, under Uncategorized

It has been a long time coming. I last updated the look of my website ten years ago, and even then that was only a modification of a design that I had been using for a few years already. Wow, how time flies!

Amusingly, I didn’t even set out to redesign my website, despite having wanted to update its look off and on over the years. What started this was that I wanted to add a list of download links for the release notes of previous versions. You wouldn’t believe the number of people using insecure and outdated operating systems and who want to run FocusWriter on them. 😛

After I finally extracted all of the information about the history of the downloads (which I store in a git repository, of course), I then felt I should pretty up the release notes to match. Which is something I have wanted to do for a very long time.

One thing led to another, and I found myself completely rewriting my custom static site generator to output a new website. Then I thought, while I am at it, why don’t I bring my blog back to my own domain? After all, that is also something I have wanted to do over the years…

I even took new screenshots of my programs! I last did that in the KDE 4 era, and once again I kept meaning to update them but never took the time. I used the newest KDE with the default Breeze widget and icon themes, despite vastly preferring Oxygen, because I imagine many more users will see my programs looking like this.

And here we are! Everything should even work on mobile, which is something the old site design did not handle very well. And I even threw in dark mode support. Whew. No wonder it took so long to do.