Archive for the 'clutter' Category

Maintenance Mode

In the last few weeks I’ve adopted a couple projects that, for whatever reason, had not been actively maintained for a while.

Cluttermm

Cluttermm wraps the Clutter Toolkit, “a software library for creating fast, compelling, portable, and dynamic graphical user interfaces”. Clutter has become an integral part of the GNOME project through its use in the GNOME Shell featured in GNOME 3. As such, I think it’d be a shame to not have high-quality C++ bindings.

Cluttermm had not really had much activity since early last year. With the rate of Clutter development, Cluttermm feel behind quickly. I’m trying to catch up now and as Murray mentioned, I’ve been able to wrap more API and fix a few bugs. So far I’ve got the 1.2 API almost fully wrapped. There are certainly bugs, some of which I’m finding now that I’m actually writing some examples. As I’m very much new to this wrapping business, I want to write a number of examples using the newly wrapped API. Once I’m comfortable that things are in good order, I’ll move onto the 1.4 and then 1.6 APIs.

GNOME System Monitor

GNOME System Monitor (g-s-m) is the default process viewer and system monitor in GNOME. I got involved by responding to the call to port g-s-m to Gtk3. Thanks goes to Openismus for allowing me to spend work time doing the porting (which I’ll blog about in the next couple days). During this process one always finds areas for improvement which spurred my interest in becoming the maintainer.

From what I can tell g-s-m hasn’t been actively developed in well over a year. You can imagine that bugzilla has a lot of suggestions for future tasks. My first order of business will be dealing with neglected patches and responding to bug reports.

So it appears as if I’ve filled all my free time for the foreseeable future. We’ll see how much I can get done between changing diapers and playing with the kids. ;)

Oh, and lastly… patches welcome. :P

Introducing Merkmal, a concentration game for GNOME.

For the last few week I’ve been working on a version of GMemory written using the gtkmm and cluttermm bindings. The project is called Merkmal.

Merkmal 0.1.0 screenshot

Currently the functionality is on par with that of GMemory. It requires at least cluttermm 1.1.2, clutter-gtkmm 0.9.6.

Here is a video of Merkmal in action. As you should see, basic game play is working but there are tons of things to be added to make the game more interesting. I listed some of those in the GMemory post.

Merkmal 0.1.0 screencast from Chris Kuehl on Vimeo.

Cluttermm

Now that I’ve ported the game to C++, adding these features should be much easier. However, there are some issues that I’ve been running into. I seem to be among the first (if not the only) consumer of cluttermm at the moment. This has of course meant that I’ve been running into bugs here and there. I’ve fixed the ones I’ve run into. I’ve also started filing bugs for missing api. For example, the new layout classes and animation framework have yet to be wrapped. I’ve filed some bugs for the ones that I’d most like to use.

GNOME Bindings

Having written the same application in both gtk+ and gtkmm, I don’t see why one would not use one of the bindings to write user apps. One of the beauties of GNOME is that there are so many high-quality bindings available. Bindings are a top priority for the project and it shows. With the introspection work that is going on, the situation will only get better.

Introducing GMemory v0.1

For the last few weeks I’ve been working on a small concentration game called GMemory. This was done as a part of the Openismus trainee program.

Update: See below.

For those not familiar with the game Concentration, or Memory as I grew up knowing it, the basic idea is that one has a number of matching card pairs turned face down. The player(s) then attempt(s) to match these pairs by turning over two cards. If the cards match those two cards remain face up. Otherwise, the cards are returned to the face down position. This is repeated until all cards are face up. Here’s a screencast of GMemory being played.

As you can hopefully see, GMemory is currently in a playable state and it actual quite enjoyable if you’re into these types of games. However, there is a lot more to do to reach what I’d consider a 1.0 release. Besides some code reworking and some known bugs, I’d like to see a score tracker, multi-player mode, card animation and selectable themes.

The game is written in C using GTK+, GObject, Clutter and Cairo. In the course of writing GMemory I ran into a few bugs in clutter-gtk. The first bug was that no events were being received when using the embedded clutter gtk widget. You can find the bug report here. The second major bug I ran into was that once I got a version combination that gave me events, I always received double the events that I expected. This is a known bug and I’ve got a work around in the code for that.

There are also a number of known bugs. As you may have noticed from the screencast, the last card of the last successful match does not get shown before the statistics dialog box pops up. It seems the dialog blocks the drawing even thought the function to draw the card is called before the call to show the dialog box. Another bug is that once the game is over the playing area does not resize when the window is resized. I’ll tackle this once I’ve reworked the code some.

You can find GMemory’s git repository at Gitorious and the tarball can be had here.

Unfortunately, right now I’m building against the master branches of clutter and clutter-gtk. Expect breakage.

Btw, I'm attending GUADEC right now.

Update: After trying this on Ubuntu Lucid, I experienced none of the event-related problems with clutter-gtk. This seems to be Fedora 13 specific. Thus, I’ve removed the workaround for the double event issue and changed the configure.ac file to rely on the clutter and clutter-gtk versions shipped with Ubuntu Lucid. The new tarball is here.