1 This file describes how to create a new KLines theme.
3 (Last update: 29.05.2007 by dimsuz)
5 KLines theme consists of svgz file which contains game elements
6 with predefined svg ID's and accompanying .desktop file which contains
7 various information about theme and some important theme settings
8 (like animation timing and number of frames)
12 There are 7 types of different-colored balls in the game and each ball
13 type has 3 animation sequences:
14 - born (played when ball appears on the field)
15 - select (played when ball is selected by player)
16 - die (played when ball is destroyed)
19 Red, Blue, Green, Purple, Yellow, Earth (dark-brown), Cyan
21 So, as a theme creator you'll need to create these 3 animation sets
22 for EACH ball color. Number of frames in each set is up to you,
23 i.e. it's configurable (see below).
25 Next, you'll need to create svg elements for field-cell, preview area
27 Yeah, klines needs many elements :-).
29 So, let me sum this all up and provide you with predefined svg
30 ID's that are needed for all the stuff:
32 1. Born animation set of each ball consists of NumBornFrames (see
33 below). Each frame has ID "[C]_born_[N]", where [C] is first letter
34 of ball's color (in lowercase) and [N] is a frame number
36 2. Select animation set of each ball consists of NumSelectedFrames
37 (see below) and each frame has ID "[C]_select_[N]".
39 3. Die animation set of each ball consists of NumDieFrames
40 (see below) and each frame has ID "[C]_die_[N]".
42 Example of IDs: e_born_1, e_born_2, ... e_born_N
43 c_select_1, c_select_2, ..., c_select_N
44 y_die_1, y_die_2, ..., y_die_N
46 4. Picture of the ball (in steady state) of each color with ID: [C]_rest
47 (e.g. r_rest, b_rest, g_rest etc)
49 5. Field cell with ID: field_cell
51 6. Picture of preview-display with ID: preview
53 7. Background image with ID: background
55 8. Optional border with ID: border
56 If theme author wishes, he can add a border element that will be painted
57 around game field, i.e. all cells will be painted inside border element's area
58 IMPORTANT NOTE: Game assumes that border visual side size will be half of field cell's size.
59 And will render it based on this assumtion. I.e. if border element exists in theme, game
60 will render cells slightly smaller, by decreasing their size on half of usual size.
61 Oh, hope you'll understand this :)
62 Better - just take a look at the current border rich themes as an example ;)
65 That's all for SVG part. Let's move to simpler one: .desktop file :)
69 As has been noted earlier, desktop file is part of each klines
70 theme and contains various info about theme as well as settings which
72 It has the Key=Value format and starts with the "[KGameTheme]"
75 here's how typical klines theme .desktop file should look like (let's name it mytheme.desktop):
77 -= example of mytheme.desktop =-
82 FileName=themefile.svgz
83 Author=Theme Author Name
84 AuthorEmail=author@email.dot
86 NumBornFrames=[Number of born anim frames in svg]
87 NumSelectedFrames=[Number of selected anim frames in svg]
88 NumDieFrames=[Number of die anim frames in svg]
90 BornAnimDuration=[Number of milliseconds to play born anim set]
91 SelectedAnimDuration=[Number of milliseconds to play selected anim set]
92 DieAnimDuration=[Number of milliseconds to play die anim set]
94 MoveAnimDuration=[Number of milliseconds to move the ball through one cell]
96 -= end of mytheme.desktop example =-
98 You may want to take a look at
99 /path/to/kdedir/share/apps/klines/themes/klines.svgz
101 /path/to/kdedir/share/apps/klines/themes/default.desktop