Technical reference
offers a gentle and rewarding introduction to 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.

For artists
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 : 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 . 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.

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 $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, 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 is available in The KDE Translation HOWTO.

For programmers
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.
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.

Structure of the layout file (layout.xml)
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.