Please help with testing! It’s easy!

If you’re running a current KDE SC 4.4 snapshot (all packages and self-compiled variants are okay), please compile/install KDiamond from kdegames. Start KDiamond, pause the game after some seconds, and unpause it after some seconds.

Please write back (either as a comment to this blog entry, or as a mail to me) what you observe: Normally, pausing should hide all diamonds and display a popup in the top left corner of the board, and after unpausing, you can continue to play the game as usual. But on some systems, the popup will get stuck in the middle of the appearing animation, stay there after unpausing, and the game will not be playable even after the unpausing.

Please also write back if everything works fine on your system, and in any case, include the following information in your report:
1. Which distribution do you run? Which version?
2. If you compiled your Qt and KDE from sources, which branch of Qt did you use, and when did you update KDE the last time?
3. If you installed your Qt and KDE from packages, which repositories did you use?

Thanks in advance. Your help is very much appreciated.

Comments (5) »

Blog’s better than backup

It’s very common that people post the scripts they’ve written for their daily tasks. Seems like blogs have become the leading backup solution for Bash scripts these days. I’ve decided to join this growing group of people, and share with you a tiny script from my ~/bin which is called “cleanup”. The code is at the bottom of the post.

When you launch cleanup, it will remove any files that match “*~” (i.e., the backup files which KWrite, Kate and many other apps create), and it will print out any files that have been removed. Additionally, it will look for a Makefile, and execute “make clean” if it has a clean rule. Everything operates on the pwd only. All in all, a very handy tool to clean the ls output.

Disclaimer: The “*~” backup files have use cases, and the “clean” rule may not do what you think it does. So when using the cleanup script, be aware of the possible consequences.


#!/bin/sh
function hasMakeClean()
{
    FALSE=1; TRUE=0
    [ -f Makefile ] || return $FALSE
    grep '^clean *\:' Makefile &>/dev/null || return $FALSE
    return $TRUE
}

case $1 in
    --help|-h|--usage|-u)
        echo Usage: $0 '[-s|--simulate]'
        ;;
    --simulate|-s)
        find . -name '*~'
        hasMakeClean && echo "> make clean located."
        ;;
    *)
        find . -name '*~' -exec rm {} \; -exec echo {} \;
        hasMakeClean && echo "> make clean" && make clean
        ;;
esac

Comments (2) »

Levitation

I usually do not write about stuff not related to KDE. But here is something I would like to share with you: The Levitation project is having a logo contest. If you do not know it yet, Levitation is an effort to rewrite MediaWiki on the basis of a Git repository, to allow for local branches and stuff. The project was started just two weeks ago in response to the controversy about notability criteria in the German Wikipedia. I wish the project all the best. After all, that’s something that, when it reaches production quality, could also be very interesting for the KDE documentation writers.

Comments (8) »

Gnome + KDE

You know about these love calculators? Yes, it’s utter nonsense, but sometimes the calculator is lucky: http://www.lovecalculator.com/love.php?name1=Gnome&name2=KDE

Comments (11) »

And now for something completely different…

Palapeli is in kdereview, and I really got to cool down from the continued QGraphicsView hacking. I decided that the best way to do so would be some Phonon hacking. ;-) Actually, I have never worked with Phonon before, but here’s what I got after two hours of work:

Ljudfil, my own command-line music player

Actually, writing a GUI media player would have been easier, but I’ve grown accustomed to using command-line media players (mplayer and cvlc, to be exact) in combination with screen after a period when my X server crashed quite regularly.

The actual code of Ljudfil is exactly 100 lines long (according to sloccount). All it can do is play all files passed on the CLI in that order, then exit (no keyboard navigation). The name has been chosen with a proven procedure of mine: I opened the Wikipedia page of what the application does or what it handles (“audio file” in this case) and looked for the nicest-sounding translation. This time, it was the Swedish “ljudfil”. By this method, Palapeli’s name was chosen, too. (“palapeli” is Finnish for “jigsaw puzzle”.)

I originally had the intention to write a command-line media player with MPRIS support. There seems to be nothing like this. I would like my media player to survive every X server crash in its screen session, yet be controllable through the “Now playing” applet on my dashboard.

But during hacking together the minimal interface of Ljudfil, I noticed that there is no possibility in Qt to use advanced terminal features. You can only write line by line, although POSIX terminals have much more functions (see “man termios” for a first impression). So, to conclude with a question: Dear lazyweb, is there any library or stuff for Qt that gives me more control over terminal output? (Extra points if it’s portable to Windows.)

Comments (1) »

Broken stuff in Palapeli today

This is an important message to people using SVN to checkout the latest Palapeli. (All others can just skip this article.)

Before you do the next “svn update”, go to your checkout directory, delete the “*.puzzle” files in the puzzles/ subdirectory (i.e., the five ones created by make-puzzles.sh). You do not have to call make-puzzles.sh anymore, the puzzles are now on the SVN server again.

Second, I have changed the configuration format for a last time. You know, when we say “playground”, we mean it. (Also, it’s easier to change it now when I don’t have to write complicated update scripts to keep compatibility.) So what does that mean to you?

  • Before installing the updated Palapeli version, you should do a “sudo make uninstall” to avoid orphaned data files in your system directories.
  • If you want to keep your savegames or own puzzles, do the following:
 cd $(kde4-config --localprefix)
 mv share/config/palapeli-{libraryrc,collectionrc}
 mv share/apps/palapeli/{puzzlelibrary,collection}
 sed -i 's/puzzlelibrary/collection/g' share/config/palapeli-collectionrc

Update: Thx to Matthew for reminding me of the fourth command which I forgot in the first run.

Comments (2) »

Qt 4.6 notice

Just a quick notice for anyone out there who builds Palapeli from SVN: It does now officially require Qt 4.6. I’m in the process of cleaning up the animation code, and esp. the new QGraphicsObject class in Qt 4.6 helps me very much in this regard.

Update: I’ve also updated the Palapeli compilation guide. If you’ve used this guide to build a Palapeli from SVN, please do the following in the “build” directory:

sudo make uninstall

Then delete everything and use the guide to create a new checkout. Stuff has changed too much. Please note that the new guide makes you install Palapeli into the standard system directories. This should work around the problems people are having with slicers not found etc.

2nd update: By the way, I’ve also changed the puzzle file format. Instead of BZip2 compression, I’m now using GZip because this reduces loading time on my system by about one second for a medium-sized puzzle. (File size is about the same.) If you’re having problems with puzzles that don’t load (sorry for the missing messagebox that tells you when a puzzle file is broken), rerun the make-puzzles script and “sudo make install” everything again. This should fix your problems.

Leave a comment »

Palapeli: Screencast!

In the last two weeks, I’ve added quite some features to Palapeli which are hard to impossible to show with screenshots, so I’ve decided to make a screencast for the very first time. recordmydesktop worked quite well, and I found a microphone in one of my junk boxes.

Hm, it seems like WordPress.com does not like embedded flash objects, so you’ll have to use the link to the 1st Palapeli screencast.

Comments (4) »

Palapeli enters Bugzilla

The sysadmins have created a Palapeli product on Bugzilla. This means that you can now start to file bug reports and feature requests for Palapeli in Bugzilla. As a start, I’ve imported my current todolist into Bugzilla, which translates into 18 reports. The most interesting ones are:

Add more feature requests and bug reports if you like.

Leave a comment »

How do you play jigsaw puzzles? [1st update]

I’m searching for possible ways to improve the user experience of Palapeli’s puzzle table. Problem: I do not know which features would help the users. Solution: Ask them (i.e., you).

After all, Palapeli is about replicating in virtuality a game that exists in reality. Everybody who plays a jigsaw puzzle on his PC will automagically try to use the same techniques and tactics which he uses to solve jigsaw puzzles in reality. For example, it is very common to search for edge pieces first.

Do you have other techniques? If yes, please don’t be shy, and leave a comment. I want to map as much as possible of your techniques to convenience features in Palapeli.

Update: A first summary. Most people say that, apart from searching for edges, they’re looking for pieces with similar colors and by level of detail. As one commenter puts it, “it all boils down to divide-and-conquer”.

Also, there has been quite some feedback on the puzzle table. Because quite some stuff occurs multiple times, I find it easier to answer them once here:

  • People are concerned about how zooming is implemented, and how pieces are limited to an certain area. I’m concerned, too. It’s becoming more and more obvious that we need a better solution, and I’ll see what I can do about this.
  • An annoying “feature” of Palapeli is that pieces are spit out randomly at the beginning, and one has to clear a part of the puzzle area to get some space for the actual image. I’ve made a quick hack-style fix for this: The pieces are now distributed only on one half of the puzzle table. A better solution will appear when the zooming stuff improves.
  • Some people would like to change the background texture. That’s possible: Right-click on the puzzle table. As you see, this is extremely non-obvious, I’ll put this interface into the Settings menu very soon.
  • The request for rotating pieces has occurred quite often. I’m generally positive towards it, because it gives a nice and easy way to introduce a difficulty parameter.
  • Some want a preview of the picture. I have a nice idea for this, but this will strongly correlate with some other features which I cannot add before KDE 4.5.

Thanks for your input. I’m currently collecting input from various sides (the kde-games-devel mailing list is also quite active currently), and evaluating possible solutions to your requests.

Comments (16) »