# The &ktron; Handbook

Fabian
Dal Santo

    linuxgnu@yahoo.com.au

Matthias
Kiefer

    matthias.kiefer@gmx.de

Developer
Lauri
Watts

    lauri@kde.org

Reviewer
1999
2000
Matthias Kiefer
2001
Fabian Dal Santo
&FDLNotice;
2003-09-16
1.1

&ktron; is a simple Tron clone for &kde;, which you can play alone or against a friend.

KDE
kdegames
KTron
game
tron

## Introduction

&ktron; is a simple Tron-Clone for the K Desktop Environment. You can play &ktron; against the computer or a friend.

The aim of the game is to live longer than your opponent. To do that, avoid running into a wall, your own tail and that of your opponent.

## Playing &ktron;

### Rules

Once a round is started, the players do not stop moving forward (unless the game is paused). All you have to do is avoid crashing by changing your players direction. Additionally you can try to hinder your opponent. For this it is possible to increase the velocity by pressing your accelerator key.

A round starts when all human players press a direction key. The initial moving direction is then in this direction.

If you want to interrupt playing, select Pause/Continue from the Game menu or hit the keyboard shortcut (see section Default Key Bindings). Additionally the game is paused when the game loses the keyboard focus, &eg; when switching to an other window.

To continue the game, select the menu item Pause/Continue again, or the keyboard shortcut. The game will also continue if the human players press one of their direction keys. But be careful, your player switches to this direction immediately.

A game consists of several rounds, and ends if a player has at least nine points, and additionally two more points than the opponent. The current score is always displayed in the status bar.

### The Computer Player

You can let the computer be Player One, Player Two or both players. There are three difficulty levels: Beginner, Average and Expert.

- If you choose Beginner, the computer doesn't care about the opponent and just moves around. This is the same algorithm as used by xtron-1.1.

- At skill levels Average and Expert, the computer tries to hinder the opponent when he comes near.

See the Settings Menu section for information on how to configure the computer player.

### Using the keyboard

Each player has five keys. Four keys for changing the direction and one to accelerate.

The direction keys do not have to be held down. Simply press them once to change the direction of your player.

Acceleration only occurs while the acceleration key remains depressed. When you release the acceleration key, velocity returns to normal.

See section Settings Menu for information how to change the default keys.

## Command Reference

The following sections briefly describe each menu bar option.

### The Game Menu

&Ctrl;N Game New

  Starts a new game.

P Game Pause

  Toggles whether the game is paused.

&Ctrl;Q Game Exit

  Quits.

### The Settings Menu

Settings Show Statusbar

  Shows or hides the Statusbar.

Settings Configure Shortcuts...

  Displays a standard &kde; key bindings configurator.

Settings Configure &kappname;...

  Opens a comprehensive dialog to configure various options.

### The Help Menu

&help.menu.documentation;

### Default Key Bindings

The following tables show you the default key bindings.

#### Player 1 Key bindings

Key Combo | Action
--- | ---
R | Up
F | Down
G | Right
D | Left
A | Accelerate

#### Player 2 Key bindings

Key Combo | Action
--- | ---
Up Arrow | Up
Down Arrow | Down
Right Arrow | Right
Left Arrow | Left
+ | Accelerate

#### General Key Bindings

Key Combo | Action
--- | ---
P | Pause Game
&Ctrl; N | New Game
&Ctrl;Q | Quit &ktron;
F1 | Help Contents
ShiftF1 | What's This Help

These key bindings can be changed by selecting Settings Configure Key Bindings from the menubar.

## The Configuration Dialog

Selecting the Configure &kappname;... option in the Settings menu will open a further dialog which lets you tweak &kappname;'s behavior.

This dialog is divided into three pages.

### General Configuration

Show winner by changing color

  Enable this box to improve visualizing that the game is over by making &kappname; change the color of the loser's trail to the color of the winner.

Disable acceleration

  Checking this box will disable the acceleration feature - pressing the acceleration key will have no effect, both snakes will always travel with constant velocity.

Crash when moving in the opposite direction

  Enable this to make a snake crash into itself as soon as a player attempts to move into the opposite direction (&ie; a snake moves left, and the player tries to move to the right in one step). If this box is not checked, nothing happens when a player attempts to move into the opposite direction.

Speed

  Use this slider to define how fast the snakes move; moving the slider to the left will make the snakes move slower, moving it to the right will make them move faster.

### AI Configuration

Computer Control

  Use these two checkable boxes to define which players should be controlled by the computer.

Intelligence:

  Selects the skill level of the computer player, Beginner, Average or Expert

  Beginner ignores the opponent, and just moves randomly. Average or Expert causes the computer to actively hinder the opponent.

### Appearance Configuration

Line style:

  Here you can choose one of four different line styles to be used for drawing the snakes. The names of the styles are self-explanatory: 3D Line, 3D Rectangles, Flat and Circles.

Line Size

  Use this slider to define how broad the trail of a snake should be. Moving the slider towards the left will make the trail more narrow, moving it to the right will result in a wider trail.

Background

  Here you can define the appearance of the playground's background. If you prefer a simple solid color, select the Color: option and click on the button at the right of it to open a convenient color-selection dialog.

  You can also choose a background image for the playground. To do so, select the Image: option, and then provide the filename of a wallpaper image to use in the input field at the right. Alternatively you can click on the little button at the very right to open the well-known file-selection dialog.

Player 1 color:

  Click on the colored rectangle to open a color-selection dialog which lets you define the color to be used for the snake of the first player.

Player 2 color:

  Click on the colored rectangle to open a color-selection dialog which lets you define the color to be used for the snake of the second player.

## Credits and License

&ktron;

Program Copyright 1999 Matthias Kiefer matthias.kiefer@gmx.de

Parts of the code are from xtron-1.1 by Rhett D. Jacobs rhett@hotel.canberra.edu.au>

Documentation Copyright 1999 Matthias Kiefer matthias.kiefer@gmx.de

Documentation updated for KDE 2.0 by Fabian Dal Santo linuxgnu@yahoo.com.au

&underFDL; &underGPL;

## Installation

### How to obtain &ktron;

&install.intro.documentation;

### Requirements

In order to successfully compile &ktron;, you need &kde; 3.0 All required libraries as well as &ktron; itself can be found on ftp://ftp.kde.org/pub/kde/.

### Compilation and Installation

&install.compile.documentation;

Should you run into problems, please report them to the the author at Matthias Kiefer