Quimeleon Manual v0.0.4

This manual describes version 0.9.3.2 of Quimeleon.


Table of Contents

Introduction
Getting Started
Usage
Configuration
The Trivia-File
The Style-File
About Quimeleon

Note

Please be aware that this manual is a work in (slow) progress. I will update it occasionally. Feel free to send me e-mail, if something is not yet explained well enough; or to correct my inadequate English.

Introduction

Quimeleon is a game engine for multiple choice trivia games. You can load your own lists of questions and answers. You can also change appearance and sounds using an XML configuration file.

You have full control over the program, you can

  • jump to the next/previous question

  • advance the current level

  • select/deselect answers

  • decide whether the selected answer is correct

  • and invoke special actions.

Quimeleon is therefore not so much a computer game, but an application which enables you to do your own little game show.

Getting Started

Although it is possible (and common) to mimic some better known game show, Quimeleon comes with a ready-made “style” and a set of dummy questions and answers to demonstrate some of the possibilities. You can simply start by invoking the command

quimeleon

At first you will only see a black window. This is to allow to first hide your desktop from your audience and then start the actual game. You can toggle fullscreen mode with F11. To exit the program press Escape. To continue press Space or Return.

When a question is displayed, you can select an answer by pressing the corresponding key a to z. You can deselect an answer with A to Z,

To be most flexible it is possible to select more than one answer. If you continue by pressing Return Quimeleon will only continue if the selected answer is correct, or mark a wrong answer and end the game. If you however continue by pressing Space all selected answers will be marked as correct.

Usage

Quimeleon follows the usual GNU command line syntax, with long options starting with two dashes. A summary of options is included below.

quimeleon [ -hvfnb ] [ -tFILE ] [ -sFILE ] [ -SNAME ] [DATADIR]

Options

-h, --help

Show help.

-v, --version

Show version of program.

-tFILE, --triviafile=FILE

Read questions and answers from FILE.

-sFILE, --stylefile=FILE

Read style data from FILE.

-SNAME, --style=NAME

Search for bitmaps, sounds, style-file, and trivia-file in the sub-directory NAME of the Quimeleon data directory before default data directory.

-f, --fullscreen

Start in fullscreen mode.

-n, --no-buffer

Do not keep Pixmaps in RAM

-b, --buffer

Keep Pixmaps in RAM (default)

Quimeleon searches for files in the following directories:

  1. The current working directory

  2. When DATADIR is given on the commandline

    1. The sub-directory corresponding to the current language settings in DATADIR.

    2. DATADIR

  3. The sub-directory corresponding to the current language settings in the global default data directory

  4. The global default data directory

  5. The sub-directory corresponding to the current language settings in the quimeleon data directory

  6. The quimeleon directory

Configuration

The Trivia-File

All questions and answers are listed in the trivia-file. If not specified otherwise with --triviafile the name of the file is default.trivia.

The following is an example of the format of a trivia-file:

[begin]

[question1]
q=Good question
a0=wrong answer
a1=correct answer
a=1

[question2]
qaudio=ua.ogg
q=Good question
a0=wrong answer
a1=wrong answer
a2=correct answer
a=2

[question3]
q=Good question
a0=correct answer
a1=wrong answer
a2=wrong answer
a3=wrong answer
aaudio=ua.ogg
a=0

[question4]
qimg=squares.jpg
a0=wrong answer
a1=wrong answer
a2=wrong answer
a3=correct answer
a=3

[question5]
a0=wrong answer
a1=correct answer
a2=wrong answer
aimg=squares.jpg
a=1

[end]

As you see, the file begins with [begin] and ends with [end].

The questions start with [question<number>]. A question/answer-entry consists of several key-value-pairs, with the key and value connected by =. The values to the keys are the following:

Table 1. 

qThe question
a<number> One possible answer. Start numbering with 0.
aThe number of the correct answer
qaudio The name of an audio file. It will be played when the question is displayed.
aaudio The name of an audio file. It will be played when the correct answer is marked.
qimg The name of an image file. It will be displayed together with the question.
aimg The name of an image file. It will be displayed when the correct answer is marked.

The Style-File

Example and overview

The following is a minimal working example of a Quimeleon style-file (for one question with one possible answer):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE quimeleon SYSTEM "quimeleon.dtd">
<quimeleon>

<group id="trivia">
    <level number="1">
        <pos width="50%" height="10%" />
        <fixed>
            <label>
                <normal color="#ffffff" font="Sans 16" />
                <text parse="true">%d</text>
            </label>
        </fixed>
    </level>


    <question>
        <pos x="50%" y="0" width="100%" height="50%" />
        <fixed>
            <varlabel>
                 <normal color="#ffffff" font="Sans 12" />
            </varlabel>
        </fixed>
    </question>

    <answer number="1">
        <pos x="50%" y="50%" width="50%" height="10%" />
        <fixed>
            <varlabel>
                <normal color="#ffffff" font="Sans 12" />
            </varlabel>
        </fixed>
    </answer>

</group>

</quimeleon>

The style consists of groups. Most important is the group with the id trivia. In this group the layout of the questions and answers is described.

A group consists of nested items. The children of an item are either put in a fixed (as in the example) or in a box environment.

The position and size of an item is defined using the pos-tag. The values are interpreted relatively to the parent item. Although it is possible to use fixed values, it is advisable to use the percent-notation which refers to the width/height of the parent item. The values of x and y default to 0. The values of width and height default to 100%.

If put in a box instead of fixed, the positon and size will be calculated (if not specified) depending on the attribute orientation of the box, that can be either vertical or horizontal.

Depending on its state an item can have different colors, fonts, pixmaps, and alpha values. The respective attributes are color, font, file, and alpha. They are assigned to a state using the tags normal, selected, active, prelight, inactive, and insensitive.

The value of color is in HTML-Hex-notation. The value of alpha is between 0 (= transparent) and 255 (= opaque). The value of file is the name of a file in a format, which is understood by the underlying GTK+-library, i.e. you need the respective GDK pixbuf loader installed. The value of font is the name of a font as used by the underlying Pango-library.

items of type label define a string to be displayed with the tag text. If the item is nested within an item with a level-id, text can define the attribute parse with a value of either true or false. If true the string will be parsed for %d, which will be substituted with the number of the level.

If there are more levels than questions in the trivia-file, only so much levels as necessary will be shown.

If there are less levels than questions in the trivia-file, all levels are shown and Quimeleon will stop when the highest level is completed.

More detailed description of tags and attributes

quimeleon

Introduces a Quimeleon style-file.

children: audio, group

audio

Defines the standard sounds.

children: sound

sound

Defines a sound to be played on display of an item. When this is a child of audio the attribute id defines on which action the sound is to be played.

attributes: id, file, continue

group

The id of group determines when the children will be displayed - the intro, the game itself or the outro.

attribute: id

children: frame, pixmap, label, question, answer, level, action, status, sequence, alternatives

alternatives

Quimeleon will decide to use one of the children of alternatives, depending on how many answers to a question are defined and how many answers can be displayed with the item (i.e. how many items have an answer-id. This tag may only be used in group trivia.

children: frame, pixmap, label, question, answer, level, action, status,

sequence

The children of sequence will be displayed one after the other during the intro or outro. This tag cannot be used in group trivia.

children: frame, pixmap, label, pause

frame

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

label

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

varlabel

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

pixmap

attributes: id, keepaspect

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

varpixmap

attributes: id, keepaspect

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

question

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

answer

attributes: id, number

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

level

attributes: id, number

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

action

attributes: id, number

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

area

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

status

attributes: id, number, reference

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

draw

attributes: id

children: sound, pos, normal, selected, active, prelight, inactive, insensitive, fixed, box

pause

attributes: seconds

filler

attributes: count

fixed

Use this tag to say that the positions of the children are to be interpreted as fixed positions.

children: filler, frame, pixmap, varpixmap, label, varlabel, question, answer, level, action, status,

box

Use this tag to say that the positions and size of the children are to be calculated, so that they are aligned depending on the value of the attribute orientation, which can be either horizontal or vertical.

attributes: orientation, spacing

children: frame, pixmap, varpixmap, label, varlabel, question, answer, level, action, status,

pos

Use pos to define position and size of an item. The values are interpreted relatively to the parent item. Append a % to the numerical value of x, y, width and height and the values will be calculated as a percentage of the parent item's width or height. The values of x and y default to 0. The values of width and height default to 100%. The attribute anchor can be one of n, ne, e, se, s, sw, w, nw, or c and defines the reference point of x and y within the item.

children: x, y, anchor, width, height

normal

Use normal to define color, alpha value, font, and pixmap filename for items that are in normal state. Whether the attributes take effect depends on the type of the item.

The value of color is in HTML-Hex-notation. The value of alpha is between 0 (= transparent) and 255 (= opaque). The value of file is the name of a file in a format, which is understood by the underlying GTK+-library. The value of font is the name of a font as used by the underlying Pango-library.

attributes: file, color, font, alpha

selected

Same as normal for selected state.

active

Same as normal for selected state.

prelight

Same as normal for selected state.

inactive

Same as normal for selected state.

insensitive

Same as normal for selected state.

text

text defines the string that is displayed by a label.

attributes: alignment, parse

audio

Define default sounds in this section.

children: sound

keys

Define key settings in this section.

children: command, action

command

Assigns a key to a command. The attribute id is one of next_question, prev_question, next_level, prev_level, toggle_fullscreen, quit, continue, continue_benevolent, select_answer, deselect_answer, select_action and defines the command. For select_answer, deselect_answer, select_action, next_status, prev_status, set_status the attribute number defines the number of an answer, an action or status. For set_status the attribute pos defines the position of the child within status. The attribute key is either a single letter or one of Alt_L, BackSpace, Caps_Lock, Control_L, Control_R, Delete, Down, End, Home, Insert, ISO_Level3_Shift, KP_0, KP_1, KP_2, KP_3, KP_4, KP_5, KP_6, KP_7, KP_8, KP_9, KP_Add, KP_Begin, KP_Delete, KP_Divide, KP_Down, KP_End, KP_Enter, KP_Home, KP_Insert, KP_Left:, KP_Multiply, KP_Next, KP_Page_Down, KP_Page_Up, KP_Right, KP_Separator, KP_Separator, KP_Subtract, KP_Up, Left, Menu, Next, Num_Lock, Page_Down, Page_Up, Pause, Print, Prior, Return, Right, Scroll_Lock, Shift_L, Shift_R, Super_L, Super_R, Tab, Up.

attributes: id, number, key

actionkey

Assigns a key to an action independent of the actions defined within item. The attribute plugin specifies the filename of the plugin. pluginarg will be passed as an argument to the plugin. key is the same as in command.

attributes: id, plugin, pluginarg, key

About Quimeleon

Quimeleon was written by Aike Reyer (). To find more information about Quimeleon, please visit the Quimeleon Web page.

To report a bug or make a suggestion regarding this application or this manual, send e-mail to the author.

Quimeleon is distributed under the terms of the GNU General Public license as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. A copy of this license can be found at this link, or in the file COPYING included with the source code of this program.