• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

accessible/H03-May-2022-

default/H03-May-2022-

egypt/H03-May-2022-

kgr_geek/H03-May-2022-

nostalgia/H03-May-2022-

READMEH A D27-Feb-20226.6 KiB148123

black-on-white.desktopH A D27-Feb-20225.2 KiB110109

default.desktopH A D27-Feb-20225.1 KiB113112

egypt.desktopH A D27-Feb-20226.2 KiB107106

kgoldrunner.knsrcH A D27-Feb-2022148 65

kgr_geek.desktopH A D27-Feb-20224.7 KiB110109

nostalgia-blues.desktopH A D27-Feb-20226.8 KiB106105

nostalgia.desktopH A D27-Feb-20226.2 KiB110109

README

1THEMES IN KGOLDRUNNER
2
3For each pictorial theme in KGoldrunner there is a "*.desktop" file in the area
4kdegames/kgoldrunner/themes in the KDE SVN source-code repository, or in the
5area $HOME/.kde/share/apps/kgoldrunner/themes, the user's local data area.  If
6two *.desktop files have the same name, the one in the local area takes
7precedence.
8
9Files in the SVN area are released and installed with KGoldrunner.  Files in
10the local area can be used for development and testing of themes or for holding
11downloaded and copied themes, whatever the method of transfer or copying.  One
12of the theme files is called "default.desktop".  That theme is used whenever
13the game runs for the first time for a particular user.  On subsequent
14occasions the last-used theme is loaded.
15
16Each *.desktop file must start with the "group" line, which says
17[KDEGameTheme].  There must also be a line which gives the name of the theme
18(e.g. Name=Foo Bar).  That line gets picked up and translated into various
19languages.  Some other standard (but optional) lines are
20Description=...,
21Author=...,
22AuthorEmail=...  and
23VersionFormat=...
24
25SVG THEMES
26
27SVG themes are the standard for KGoldrunner 3+ (KDE 4+).  The *.desktop file
28must contain a Set=xxxx line and an Actors=yyyy line, that contain the
29filenames in which to find the SVG graphics for the tiles and background (the
30set) and the runners (the actors).  The filenames must end in .svg or .svgz and
31the file must be in or relative to the same folder as the *.desktop file.  By
32convention, the files are always in a sub-folder named after the theme.
33Example, theme-file "default.desktop":
34
35    [KDEGameTheme]
36    Name=KGoldRunner Default
37    Name[el]=Προκαθορισμένο KGoldrunner
38    Name[es]=KGoldRunner predeterminado
39    Description=A light and clean theme for KDE4
40    Description[el]=Ένα απλό και ελαφρύ θέμα για το KDE4
41    Description[es]=Un tema luminoso y limpio para KDE4
42    Author=Mauricio Piacentini
43    Set=default/set.svg
44    Actors=default/actors.svg
45    DrawCanvasBorder=1
46    BorderColor=#2C89A0
47    TextColor=#FFFFFF
48
49Note that Name and Description have been translated.  DrawCanvasBorder=1 says
50that a border is required around this theme, rather than the default behavior
51of letting the background fill the canvas (see below).  BorderColor and
52TextColor supply hex color codes for the border area and the text of the
53game and level titles.
54
55As SVG themes become more sophisticated, it is expected that other meta-data
56will be needed in the *.desktop files.  Such changes must be matched with
57code-changes, by KGoldrunner's maintainers, that will read the new meta-data
58and act on it.  Artists and maintainers need to work together on this.
59
60SVG ELEMENTS
61
62The elements in the SVG file must have standard names, corresponding to their
63role in the KGoldrunner game.  Each element should be set in a perfectly square
64space.  It will typically be displayed in about 24x24 to 36x36 pixels (7-10mm),
65so detail can be sketchy, as for an icon.  The elements are:
66
67    empty           An empty square: used in the game-editor.
68    gold            Any kind of prize or reward, not necessarily a gold piece.
69    hero_n          A set of frames for the running hero (e.g. n = 1 to 36).
70    enemy_n         An equivalent set of frames for the enemies.
71    gold_enemy_n    An equivalent set of frames for enemies carrying gold.
72    concrete        A piece of hard floor that the hero CANNOT dig through.
73    brick           A piece of floor that the hero CAN dig through.
74    brick_n         A set of frames for brick-digging animation (n = 1 to 9).
75    ladder          A means for the hero and enemies to move upward.
76    bar             A means for the hero and enemies to move over an abyss.
77    false_brick     A piece of floor that gives way under the hero and enemies.
78    hidden_ladder   A ladder that appears when the hero has all the gold and can
79                    proceed to the next level of the game.
80    background      See below.
81    background<n>   Background set (n starts at 0)
82
83The background element is not square like the others.  It will be displayed
84behind the other elements and scaled to a space equivalent to 32 x 24 smaller
85elements, at least.  It could be stretched further in either direction, at the
86user's whim, and will always fill the central widget.  The actual play-area
87will always be 28 x 20 square elements.  The play-area has a thin black frame
88around it and a title-text above it.  The space around the play-area is a
89buffer-zone, to protect against mouse-action spilling over into the surrounding
90desktop.
91
92As an alternative to a single background element, a series named background0,
93background1, ... backgroundn can be provided. Each level will load a different
94background until the last background provided is reached, after which the first
95one is used again.
96
97It is possible that the background and animation frames could be provided as
98PNG files, depending on the source (e.g. photograph or animation package).
99That is yet to be decided.
100
101The background should make arbitrary arrangements of smaller elements easily
102visible and recognisable to the game player, i.e. it must be playable in all
103levels of all games.  This should be tested by displaying several levels with a
104new theme before it is released (e.g. use the Game->New Game... dialog).
105
106KGoldrunner 3.1 allows more options to the graphics designer to customize the
107look of the game.  The themes from KGoldrunner 3.0 are so far compatible with
108kgoldrunner 3.1; it is possible to develop a theme for KDE 3.1 that is still
109compatible with the old version with the use of some care.
110
111New element for version 3.1 of KGoldrunner:
112A frame surrounding the border area can be specified as svg tiles now.
113
114The tiles have to be named:
115frame-topleft
116frame-top
117frame-topright
118frame-left
119frame-fill       (not actually used, but must be present.)
120frame-right
121frame-bottomleft
122frame-bottom
123frame-bottomright
124
125The frame-top, frame-bottom, frame-left and frame-right tiles are repeated
126along the border of the playing area to connecte the four corners.
127
128It is possible to give a border to the display areas for the score and lives,
129which are displayed now in the safe area at the bottom of the screen. To do so, the theme must include the following tiles:
130display-left
131display-centre
132display-right
133
134Finally, most tiles may have a few variants to make the playground less
135repetitive. These are the tiles that can have variants:
136bar
137ladder
138concrete
139brick
140
141The variants must be named bar-0, ..., bar-<N> brick-0, ..., brick-<N> as
142consecutive numbers.
143
144To make the theme work in KGoldrunner 3.0, a tile without the numbering suffix
145must be provided. This tile is not used by version 3.1 if numbered tiles are
146present.
147
148