An up-to-date look at free software and its makers

Projects on the Move


The number of games available for KDE could start growing soon with the free Gluon library to facilitate programming. A Gnome developer shows how to design user-friendly software. Proprietary PDF editing programs could soon be a thing of the past thanks to PDF Mod.

By Carsten Schnober

Tomas Del Amo, 123RF

If you believe politicians, computer games are mainly used to prepare youths to run wild. Yet French KDE developer Sacha Schutz has taken steps to facilitate the development of new games for the K Desktop environment.

Karicat

Gluon [1] is designed to facilitate access to audio and graphics hardware for KDE developers and to help programmers quickly develop a world in which realistic physical laws apply, such as the speed and impact of falling objects.

Schutz has developed the first working program based on Gluon, Karicat [2], which creates avatars similar to Miis [3], the three-dimensional virtual characters for the Wii console (see Figure 1). The program is at a fairly early stage of development and is thus more a demonstration of the capabilities of the underlying Gluon library. When this issue went to print, it did not provide functionality for saving your own creations.

Figure 1: Karicat creates three-dimensional avatars to demonstrate the capabilities of the Gluon games library for KDE 4.

Despite this, Karicat is already an exciting program. In a surprisingly intuitive interface, users can edit a comic character's head by defining the facial features, hair, nose, mouth, ears, eyes, and eyebrows. To do so, users choose from predefined prototypes, which are then customized with simple mouse movements.

The theme (a graphics file in SVG format) defines the basic traits of the new face. Thus far, the package only offers a single theme, although the community will have fun contributing more looks once Karicat is finished. Just like the Miis, the Karicat faces support simple animations that bring an avatar to life.

The Karicat source code is available in a Git repository on the project homepage. If you inspect the source code, you will soon see how easy the Gluon library makes the task of developing a program like Karicat with a fairly impressive range of functions.

Gluon

Gluon currently comprises three core components:

KCL handles input devices with a modular system that lets you support devices other than traditional components, such as mice, keyboards, or joysticks. Schutz is obviously thinking of more recent interaction methods, such as webcams or the controllers that come with the Wii console.

The Gluon KDE Audio Library (KAL) handles sound output for games developed with Gluon. This part is fairly unspectacular because - to put it simply - the whole thing is just designed to pass sound on to the desktop's sound system. This doesn't mean the developers have taken the easy way out: The external OpenAL [4] (Open Audio Library) calculates the rising and falling volume of approaching and disappearing objects, for example.

Most of the work has gone into the third Gluon component, KGL, which handles graphics output and provides the physics engine. Calculating impact and reciprocal actions between objects is one of the most complex tasks in games and other applications with interacting objects; it stands to reason that a fair amount of work is still to be done here.

KGL relies on Box2D [5] for two-dimensional space. The free KGL library simulates realistic acceleration, speeds, collisions, and other physical effects. Most of the work relates to the third dimension, and Gluon development is still in an early stage here. When this issue went to print, the developers were working on integrating the Open Dynamics Engine [6], which does more or less what Box2D does, but in a 3D space.

The Gluon team is looking for volunteers to contribute to the project. You will need C++ skills for this, but graphics artists are also welcome. Gluon contributors should be aware that the library is likely to boost the number of games available for KDE.

Recording

Compared with calculating collisions between three-dimensional objects, the next topic is fairly simple: recording sound with a microphone. From a usability point of view, the technical complexity of designing the user interface does not always relate directly to the complexity of the task. In fact, simple things need intuitive interfaces because no on wants to read the manuals.

Thus far, the Gnome desktop has had the Gnome Sound Recorder (Figure 2). The program does what it is supposed to do without any problems, thus fulfilling the major criterion for a good usability rating. But it has some weaknesses; for example, not many users will be capable of changing the audio input they use on their first attempt. And the layout is not exactly state of the art. This prompted Dutch Gnome programmer Hylke Bons to express a couple of opinions on a new development named Gnome Voice Recorder.

Figure 2: Gnome Sound Recorder shows its age - which is why a replacement is planned.

If you follow popular how-tos on developing user-friendly software, you need to sketch the program windows and dialogs before you think about writing a single line of code. Bons has kept to this approach and presents the results of this preparatory work in his blog [7]. We were very excited at Linux Pro Magazine to get an exclusive peek at his latest, unpublished drafts just before this issue went to press.

Figure 3 shows the main window of the currently non-existent Gnome Voice Recorder program. It has shed the configuration functions that occupy a very prominent position in Gnome Sound Recorder and simply contains Record and Stop buttons, a menu, and a list of sound files you have recorded. Bons is looking to move the other settings out into a separate dialog box (Figure 4).

Figure 3: Gnome Voice Recorder could look like this: The clean main window is designed for looks and usability.

Figure 4: Instead of settings in the main window, you get a separate dialog box.

Bons is looking to enhance the Gtk-based desktop's multimedia suite with Gnome Voice Recorder and has based the design on more recent programs in the same field: the Cheese webcam tool [8], the Banshee multimedia player [9], and the F-Spot photo management software [10]. Bons emphasizes the example that Cheese has set by protecting the user against inadvertent direct access to the filesystem. Completed recordings - from the webcam in Cheese's case and from the microphone in Gnome Voice Recorder's case - are automatically sent to the correct directory, where users will find them for further processing.

Small Steps to Success

A single application such as Gnome Voice Recorder is unlikely to convince PC users to change their free desktop preferences. However, it is the small utilities in particular that make working with a PC that much easier and reduce the frustration that newcomers can experience. Of course, if utilities are missing or cause usability problems they can just as easily frighten off potential converts.

If users are forced to launch a feature-rich application like Audacity [11] just to record some noise because of the inadequacies of Gnome Sound Recorder, the computing experience will suffer. The program interface does not have the same look as the desktop, and controlling the versatile audio tool can mean a fairly substantial learning process. On the other hand, if users immediately find the right tool for a minor task and quickly achieve the desired results, they are likely to feel more at home in an environment.

The moral of this story is that even smaller projects should introduce a structured approach to programming. This includes following the lines that Bons has taken: Start by sketching the interface, solicit proposed improvements, and continually improve the sketches before starting to code. In line with this, the Gnome Voice Recorder developers invite users to contribute more ideas and help the project move along. When this issue went to press, a lively discussion was already in progress on Bons' blog.

INFO
[1] Gluon: http://gluon.tuxfamily.org
[2] Karicat: http://gitorious.org/gluon/karicat
[3] Mii: http://en.wikipedia.org/wiki/Mii
[4] OpenAL: http://connect.creativelabs.com/openal
[5] Box2D: http://www.box2d.org
[6] Open Dynamics Engine: http://www.ode.org
[7] Gnome Voice Recorder: http://www.bomahy.nl/hylke/blog/gnome-voice-recorder
[8] "Free Software Projects" by Carsten Schnober, Linux Pro Magazine, July 2009: http://www.linux-magazine.com/w3/issue/104/094-095_projects.pdf
[9] Banshee: http://banshee-project.org
[10] F-Spot: http://f-spot.org
[11] Audacity: http://audacity.sourceforge.net