Archive for May, 2008

Even Tetris can have bugs

Tetris is such a simple game, it should be easy to make! And it is. It’s also quite easy to overlook a few things. I fixed two issues (pieces would stick to the left edge if you rotated them there, and at 225 lines the pieces jumped to an insane fall speed) and made a small perfomance tweak: it now caches the tile images for the board.

I’m actually amazed by how popular Gottet is, considering the abundance of Tetris clones available. I wasn’t expecting there to be any downloads at all, to be honest. Shows what I know!

Now that’s robin egg blue

Nest with robin eggs

Today I discovered a nest in a tree near where I live, and when I peeked inside I saw several little eggs.

Working with file previews

After a busy month, I have finally had some time to focus on Tetzle again. The first issue I decided to tackle was the “Add Image” dialog. There were a couple of things about it that bothered me, the biggest being that I could only preview one image at a time. Here is what the dialog looks like in the currently released version:

Add Image dialog in 0.6

The hardest thing about solving the file preview issue was that I couldn’t figure out how to get a QDirModel to allow me to set the icon for each file after it was shown. I tried creating a QFileIconProvider that created previews from the files, but that blocks the interface while the previews are loading. Not good. After several unfruitful hours of searching for other solutions, I switched the file list to a QListWidget. It was so much easier to work with! I don’t understand how anyone can like the new Model-View classes, I find them incredibly annoying.

The other issues were a lot simpler to solve (as I was expecting), and I finished up the new dialog yesterday. Here is what it will look like in the next release:

Add Image dialog in 0.7

Follow

Get every new post delivered to your Inbox.