Category: CuteMaze (Page 2 of 4)

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!

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!

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.

But where to put you?

Posted on October 13, 2009, under CuteMaze, Programming

I’ve been writing programs with Qt since the Qt 3 era, and when I made my first Qt 4 programs available for general use I added cross platform support. One thing that entails is storing user data files in different locations on different platforms. At the time, I couldn’t find any way in Qt to do that, so I ended up writing this in CuteMaze:

QString homeDataPath()
{
#if defined(Q_OS_MAC)
	QString path = QDir::homePath() +
		"/Library/Application Support/GottCode/CuteMaze";
#elif defined(Q_OS_UNIX)
	QString path = qgetenv("XDG_DATA_HOME");
	if (path.isEmpty()) {
		path = QDir::homePath() + "/.local/share";
	}
	path += "/games/cutemaze";
#elif defined(Q_OS_WIN32)
	QString path = QDir::homePath() +
		"/Application Data/GottCode/CuteMaze";
#endif
	return path;
}

I’ve never been happy with that code. For one thing, it uses platform specific code in a platform independent codebase, which limits the number of supported platforms to those I can easily test myself. Thankfully, I will notice any bugs I introduce in one platform but not the rest, since I build my programs on those platforms.

However, I was recently made aware of the fact that CuteMaze would not compile on less common platforms, and that piece of code was one of the reasons. I figured that this was a chance to improve said code, so I went looking to see if there is a better way to write… and there is! After I released CuteMaze, a new class for desktop integration was added to Qt. The above code would be better written like this:

QString homeDataPath()
{
	return QDesktopServices::storageLocation( QDesktopServices::DataLocation ) + "/CuteMaze";
}

The above functionality was added in Qt 4.4. Instead of using it, I have been dragging the messy and inferior code from project to project. Obviously I don’t re-solve every problem I come to, I remember what I have done or what I have read about. It’s only natural I will miss things when reading about new versions of Qt.

Now that I know about this, I am going to use the new code for the platforms not already supported. In future projects I will use only the new code, but I don’t want to go through the headache of moving all of the user data files for all of my current projects.

A new CuteMaze release!

Posted on September 21, 2009, under CuteMaze

It has been over a year since I last updated CuteMaze. I have worked on it since then, but my other projects distracted me so much I didn’t think about it. A few months ago I added zooming support, but moving was pretty slow when zoomed out. I finally got around to looking at it a few days ago, and I discovered that I could noticeably speed up rendering by caching the background. I don’t know why I didn’t do that from the start, actually.

Once I had done that, I decided that it was time to polish up CuteMaze and make a release. I don’t want the new features to sit for too long without people getting to use them, and a year is pretty long! Along with zooming, I also added support for hints. Other than that it is mostly code cleanup. I had intended to rewrite the maze generation algorithms, but I lost interest in that and I have pushed that off to a future release.

For anybody who has made themes, this new release changes the format from being a collection of SVG files to being a single SVG file. You need to put a transparent rectangle behind smaller elements to make them render at the appropriate sizes. It is a fairly easy change to make, and you can look at the provided themes for examples.

Categories