Copyright © 1999, 2000, 2002 Eric Bischoff
Copyright © 2001 Paul E. Ahlquist Jr.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
KTuberling is a game intended for small children.
Table of Contents
KTuberling is a game intended for small children. Of course, it may be suitable for adults who have remained young at heart.
It is a ‘potato editor’. That means that you can drag and drop eyes, mouths, mustache, and other parts of face and goodies onto a potato-like guy. Similarly, you have a penguin on which you can drop other stuff.
There is no winner for the game. The only purpose is to make the funniest faces you can.
There is a museum (like a ‘Madame Tusseau’ gallery) where you can find many funny examples of decorated potatoes and penguins. Of course, you can send your own creations to the programmer, Eric Bischoff, who will include them in the museum if he gets some spare time.
KTuberling can also ‘speak’. It will spell out the name of the objects you drag and drop. It will ‘speak’ in your own language, or English if the sounds for your language do not exist. Currently, KTuberling can ‘speak’ Danish, German, English, French, Dutch, Romanian, Slovenian and Swedish.
There are two areas in the main window:
“Playground” area, on the left side.
“Objects” area, on the right side, where you select Objects to place on your playground.
To drag an object, move the mouse pointer to the ‘objects’ area on the right. Click on the object you want to drag, but do not release the mouse button until you have moved the mouse pointer to the location in the ‘playground’ area where you want to drop the object.
Once dropped in the ‘playground’ area, an object can be moved. Just click on the object to select it for further drag and drop. When you click on it, it goes on top of other objects that were partially hiding it. This trick is useful for getting the glasses and eyes placed correctly.
The toolbar provides buttons for the commonly used functions.
Table 2.1. Toolbar Buttons
Button | Name | Action |
---|---|---|
![]() | New | Resets the “playground” area. This cleans all parts off the playground so a new decoration may be created. |
![]() | Open | Opens an existing tuberling file from the museum or from other folders. |
![]() | Save | Saves your creation to your home folder, or to some other folder like the museum if you wish. The tuberling is saved to a small file where only the position of objects are saved. |
![]() | Prints your picture (PostScript® format). | |
![]() | Undo | Undoes last operation. |
![]() | Redo | Re-does last operation. |
Clears the “playground” area
Opens an existing tuberling file from the museum or from somewhere else if you wish.
Saves your creation. The tuberling is saved to a small file where only the position of objects are saved.
Creates a graphics file containing a picture of your tuberling. Available file formats are XPM, JPEG, PNG and BMP.
Print your tuberling picture using PostScript® format.
Quit KTuberling.
Copy the “playground” area to the clipboard.
Undo the last “object” placement.
Re-does the last “object” placement. This menu option is active only if you have previously used Undo.
Toggles sound on/off. If artsd is not running, this menu item is disabled. You need to have kdemultimedia installed to be able to hear sounds. KTuberling remembers last setting of this option the next time it starts up.
Switches to potato playground. KTuberling remembers the last chosen playground the next time it starts up.
Switches to penguin playground. KTuberling remembers the last chosen playground the next time it starts up.
Invokes the KDE Help system starting at the KTuberling help pages. (this document).
Changes the mouse cursor to a combination arrow and question mark. Clicking on items within KTuberling will open a help window (if one exists for the particular item) explaining the item's function.
Opens the Bug report dialog where you can report a bug or request a “wishlist” feature.
This will display version and author information.
This displays the KDE version and other basic information.
KTuberling offers a gentle and rewarding introduction to KDE customization and programming. The application can be extended. For example, without any coding, new playgrounds can be added by changing the graphics files. By adding appropriate sound files, translators can change the sounds to their native tongue!
If you extend or add to the game please consider sending your additions to the developer Eric Bischoff for inclusion in future releases.
The size and shape of the playground and the number of objects can be changed. New playgrounds can be added. Only two image files need to be created for each playground: a gameboard and a mask. A maximum of 8 playgrounds is allowed, out of which only 2 are currently used.
Four images are used in KTuberling: potato-game.png, potato-mask.png, penguin-game.png and penguin-mask.png. The standard location for these files is the directory $KDEDIR/share/apps/ktuberling/pics/.
The first type of images, *-game.png holds the playground and the objects that the user selects. This is the graphic that the user sees when playing the game.
The second type of images, *-mask.png, contains only masks of the objects. The masks are used to delimit the borders of the objects and, in some cases, give the object some transparancy (for example, the spectacles). It is mandatory to put the objects at the same position in the gameboard file as in the mask file.
In the same directory, a file named layout.xml. ($KDEDIR/share/apps/ktuberling/pics/layout.xml) tells which images to use and links them to menu entries. It also contains the position parameters of the playground and the objects in the gameboard and in the masks. It finally assigns the sounds to objects and places the objects in groups. It follows standard XML syntax (see details below).
Still in the same directory, a file named layout.i18n ($KDEDIR/share/apps/ktuberling/pics/layout.xml) recapitulates the strings in layout.xml that can be translated:
The menu entries that allow to choose the gameboards
The names of the categories of objects
The names of the sound files. This is a programming trick that permits that the translation teams record someone saying the names of objects in their own languages, and to reference the names of these sound files when they exist.
One directory above, a file named ktuberlingui.rc ($KDEDIR/share/apps/ktuberling/ktuberlingui.rc) is a second XML file describing the menus of KTuberling. It should contain one <action> tag per playground. The symbolic name of the action in this file should be identical to the symbolic name of the action in layout.xml.
Besides the usual .po files mechanism for translating program labels and prompts, the sounds can be localized too.
If the various translators can record their voice to a .wav file, they can store that file to the language-specific subdirectory of the sounds directory. The name of the sound file is then translated in the .po file. For example, if destination language is Italian, translators can record their voice in .wav files located in $KDEDIR/share/apps/ktuberling/sounds/it. Then they can translate file names like en/hat.wav to names like it/cappello.wav.
In a future release, KTuberling will use OGG Vorbis rc3 file format for sounds. At that moment, it will be possible to convert the WAV files to OGG Vorbis rc3 through the following command line:
$ oggenc_rc3 -o sound.ogg sound.wav
Information on how to work with the translation mechanisms in KDE is available in The KDE Translation HOWTO.
KTuberling isn't really difficult to extend for programmers.
Top-level window and basic program management
Description of one of the graphical “objects” to be drawn
A .tuberling file holds all the necessary data to redraw a tuberling. It can be edited with an ordinary text editor.
The first line holds the number of the playground.
On all other lines, there is one graphical object per line, in the order that is used to draw them. Each line contains 5 numbers: the identifier of the object, and the rectangle where it should be drawn (left, top, right, bottom). The numbers are separated by whitespaces.
The top-level tag is unique and is named <ktuberling>. It contains several <playground> tags, one per playground.
The <playground> tag has two attributes: gameboard and masks. These attributes give the name of the files holding the pictures. The <playground> tag also contains one <menuitem> tag, one <editablearea> tag, several <category> tags, and several <object> tags.
The <menuitem> tag describes the action identifier of the menu item allowing to select position of the area where you can drop objects, and the label of this menu item. This action identifier should be identical to the one in ktuberlingui.rc.
The <editablearea> tag describes the position of the area where you can drop objects, and the sound associated with it.
The <category> tag describes the position and the label of a text describing a group of objects. For example, it can describe the position and the text of the group of “goodies”.
The <object> tag describes the position (in the gameboard and in the masks) of an object, as well as the English sound associated with it.
The lower level tags are not explained here, since their meaning is quite straightforward. If you modify layout.xml, don't forget to modify layout.i18n and ktuberlingui.rc accordingly.
KTuberling
John Calhoun - Original idea, original pictures and English sounds
Eric Bischoff <ebisch@cybercable.tm.fr> - KDE Programming
François-Xavier Duranceau <duranceau@free.fr> - Tests, advice and help
Agnieszka Czajkowska <agnieszka@imagegalaxy.de> - Penguin graphics
Bas Willems <next@euronet.nl> - Graphics reworks
Roger Larsson <roger.larsson@norran.net> - Sounds tuning
Peter Silva <peter.silva@videotron.ca> - Proofreading of the documentation
Paul Ahlquist <pea@ahlquist.org> - Bettering of documentation
This game is dedicated to my little daughter Sunniva Bischoff
Thanks to Apple Computer and to the LinuxPPC™ project for having made ports of Linux® to the Mac®. KTuberling would never have existed without that!
This documentation is licensed under the terms of the GNU Free Documentation License.
This program is licensed under the terms of the GNU General Public License.
KTuberling is part of the KDE project http://www.kde.org/.
KTuberling can be found in the kdegames package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.
In order to successfully compile KTuberling, you need KDE 3.0. All required libraries as well as KTuberling itself can be found on ftp://ftp.kde.org/pub/kde/.
To be able to hear the sounds, you need to have kdemultimedia installed.
In order to compile and install KTuberling on your system, type the following in the base directory of the KTuberling distribution:
% ./configure % make % make install
Since KTuberling uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.