KTuberling"> ]]> %ents; ]> The KTuberling Handbook Eric Bischoff
e.bischoff@noos.fr
06/02/2001 0.1 &ktuberling; is a game intended for small children. KDE KTuberling game potato tuberling children
Introduction &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. 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. 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. On screen Fundamentals Mouse Operation There are two areas in the main window: Potato area, on the left side. Objects area, on the right side, where you select Objects to place on your potato! Main Window of &ktuberling; main window: Main Window Placing an Object 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 potato area where you want to drop the object. Moving an Object Once dropped in the potato 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. Removing an Object To remove an object that has been dropped in the potato area, drag it back from the potato area to the objects area. The Tool Bar Toolbar The toolbar provides buttons for the commonly used functions. Toolbar Buttons Button Name Action New Resets the potato area. This cleans all parts off the potato so a new character may be created. Open Opens an existing tuberling file from the museum or from other folders. Save Button Save Saves your creation to the museum, or to some other folder if you wish. The tuberling is saved to a small file where only the position of objects are saved. Print Button Print Prints your picture (&PostScript format). Undo Button Undo Undoes last operation. Redo Button Redo Re-does last operation.
The Menu Items Menu Bar The File Menu File Menu &CtrlN File New Clears the potato area &CtrlO File Open Opens an existing tuberling file from the museum or from somewhere else if you wish. &CtrlS File Save Saves your creation. The tuberling is saved to a small file where only the position of objects are saved. File Save as picture... Creates a graphics file containing a picture of your tuberling. Available file formats are XPM, JPEG, PNG and BMP. &CtrlP File Print Print your tuberling picture using &PostScript format. &CtrlQ File Quit Quit &ktuberling;. The Edit Menu Edit Menu &CtrlC Edit Copy Copy the potato area to the clipboard &CtrlZ Edit Undo Undo the last object placement. &CtrlShift Z Edit Redo Re-does the last object placement. This menu option is active only if you have previously used Undo. The Options Menu Options Menu Options Sound Toggles sound on/off. If artsd is not running, this menu item is disabled. The Help Menu Help Menu F1 Help Contents Displays this handbook. Shift F1 Help What's This Get help for an item by clicking on it. This feature is not fully implemented. Playing with this option does no harm. Help Report bug... Report a bug or request an enhancement to &ktuberling;. Help About kTuberling Displays information about the program. Also strokes the ego of the authors. Help About KDE Tells about one of the greatest Linux-related projects.
Technical reference &ktuberling; offers a gentle and rewarding introduction to KDE customization and programming. The application can be extended. For example, without any coding, new vegetable characters 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. Graphics The size and shape of the gameboard and the number of objects can be changed. Only two files need to be created: a gameboard and a mask. Two images are used in &ktuberling;: "gameboard.xpm" and "masks.xpm". The standard location for these files is the directory $KDE/share/apps/ktuberling/pics/. "gamboard.xpm" holds the gameboard and the objects that the user selects. This is the graphic that the user sees when playing the game. The second file, "masks.xpm", 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). In the distributed masks.xpm the objects are duplicated from gameboard.xpm. This is an artifact of the original artist's technique. Only the masks, the stencil-like images, in masks.xpm are used by the program. The third file in the directory, layout.txt. ($KDE/share/apps/ktuberling/pics/layout.txt) contains the position parameters of the objects and the masks. It also assigns the sounds to objects and places the objects in groups. This file is changed to describe the graphic to the program. It contains only decimal integers, separated by whitespace, followed by a comment. 0 0 240 320 0 Area where objects can be dropped 6 Number of texts described here 241 101 413 115 0 "Eyes" text 415 123 511 137 1 "Eyebrows" text 241 179 394 193 2 "Noses" text 395 179 511 193 3 "Ears" text 241 259 445 273 4 "Mouths" text 241 307 511 321 5 "Goodies" text 43 Number of objects described here 242 0 283 32 70 0 111 32 1 Eye #1 242 34 283 66 70 34 111 66 1 Eye #2 242 68 283 100 70 68 111 100 1 Eye #3 : : <---cut---> Layout header line. This line describes the area of the gameboard where objects are placed (the potato area). The first four numbers are the coordinates of the area: left, top, right, bottom. The fifth number is the index number of the associated sound. The sounds are defined in the source file categories.h. Quantity of group labels This, the second line, is the number of group text labels defined in the next section of this file. Label positions These lines describe the position of the text labeling the groups or categories of objects. The text of the labels can only be changed in the source code (categories.h). Only the position of the labels can be changed here. Quantity of objects This line is the number of objects described in the next section of the file. Adjust this number if you add or remove objects. Individual objects In this section each of the individual objects are described. The position of the objects in gameboard.xpm and the positions of the masks in masks.xpm. The first four numbers are the coordinates of the object rectangle on the gameboard: left, top, right, bottom. The fifth through eighth are the coordinates of the object's mask, same ordering. The ninth number is the index of the associated sound. Several objects can be associated with the same sound. Translation 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 $KDE/share/apps/ktuberling/sounds/it. Then they can translate file names like en/hat.wav to names like it/capello.wav. Information on how to work with the translation mechanisms in &kde is available in The KDE Translation HOWTO. For programmers KTuberling isn't really difficult to extend for programmers. C++ classes TopLevel Top-level window and basic program management ToDraw Description of one of the graphical objects to be drawn .tuberling files structure A .tuberling file holds all the necessary data to redraw a tuberling. It can be edited with an ordinary text editor. 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. Credits and License Credits John Calhoun - Original idea, pictures and english sounds Eric Bischoff ebisch@cybercable.tm.fr - KDE Programming François-xavier Duranceau duranceau@free.fr - Tests, advice and help Peter Silva peter.silva@videotron.ca - Proofreading of the documentation Paul Ahlquistpea@ahlquist.org - Reformated and added screenshots for KDE 2.1. Expanded the graphics section of the technical reference. This game is dedicated to my little daughter Sunniva Bischoff Thanks to Apple Computer and to the Linux PPC project for having made ports of Linux to the Macintosh. KTuberling would never have existed without that! License &underFDL; &underGPL; There is no warranty that this program works or for whatever. Installation How to obtain <application>ktuberling</application> ktuberling is a game application for the KDE project http://www.kde.org. Ktuberling can be found on ftp://ftp.kde.org/pub/kde/, the main ftp site of the KDE project. Requirements In order to successfully compile ktuberling, you need the latest versions of libkdecore, libkdeui, libkfile, libkfm, and libmediatooli. All required libraries as well as &ktuberling itself can be found on ftp://ftp.kde.org/pub/kde/. Compilation and installation 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