<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "/usr/share/sgml/docbook/xml-dtd-4.1.2/docbookx.dtd" [
  <!ENTITY rnd "Rocks'n'Diamonds">
]>

<book id="RnD-Doc">
  <bookinfo>
	<title>Rocks'n'Diamonds Documentation</title>

	<authorgroup>
	<author>
	<firstname>Niko</firstname>
	<surname>Böhm</surname>
	</author>
    <corpauthor>The Rocks'n'Diamonds Community</corpauthor>
	</authorgroup>

    <copyright>
      <year>2004</year>
      <holder>Niko Böhm</holder>
      <holder>the Rocks'n'Diamonds Community</holder>
    </copyright>

    <releaseinfo>$Id: rnd-doc.xml,v 1.11 2004/04/08 22:22:28 niko Exp niko $</releaseinfo> 

    <legalnotice>
      <para>
        Permission is granted to copy, distribute and/or modify this document 
        under the terms of the GNU Free Documentation License, Version 1.1 or
        any later version published by the Free Software Foundation
      </para>
    </legalnotice>

  </bookinfo>

  <chapter id="rnd-about"><title>About</title>
	<sect1 id="rnd-about-about"><title>About</title>
	  <para>
	    Rocks'n'Diamonds is puzzle game in the spirit of Boulderdash. In fact
		you can play nearly all of the original Boulderdash-Caves with it, as 
        well as Emerald Mine, Supaplex and Sokoban levels. Rocks'n'Diamonds
        does not exactly behave like these, but this will improve in future
        and most levels are already solveable by now.
	  </para>
	</sect1>

	<sect1 id="rnd-about-history"><title>History</title>
      <para>
        See <ulink url="http://www.artsoft.org/rocksndiamonds/">
        <citetitle>http://www.artsoft.org/rocksndiamonds/</citetitle></ulink> and
        <ulink url="http://www.artsoft.org/rocksndiamonds/doc/CHANGES"><citetitle>
        http://www.artsoft.org/rocksndiamonds/doc/CHANGES</citetitle></ulink> for
        details.
      </para>
    </sect1>
  </chapter>

  <chapter id="rnd-install"><title>Installation</title>
    <sect1 id="rnd-install-windows"><title>Installing on Windows</title>
      <para>
        Use a program with support for zip archives (for example
        <ulink url="http://www.winzip.com/"><citetitle>Winzip</citetitle></ulink>)
        to unzip the game archive to any directory and from there enter the directory
        and start <command>rocksndiamonds.exe</command>.
      </para>
    </sect1>

    <sect1 id="rnd-install-linux"><title>Installing on Linux</title>
      <para>
        Untar the tarball, e.g. with
        <command>tar xvzf rocksndiamonds-3.0.8.tar.gz</command>. To start
        the game, enter the
        created directory and type <command>./rocksndiamonds</command>
      </para>
    </sect1>
		
    <sect1 id="rnd-install-macosx"><title>Installing on MacOS-X</title>
      <para>
        Activate the .dmg (disk image) file by double-clicking it and drag the
        included folder "Rocks'n'Diamonds" to wherever you like to have it
        on your hard disk. That's it!
      </para>
    </sect1>
		
    <sect1 id="rnd-install-source"><title>Compiling from Source</title>
      <para>
        Untar the tarball, enter the directory and have a look in the README-file.
      </para>
    </sect1>
  </chapter>

  <chapter id="rnd-basic"><title>Basic Gameplay</title>
    <sect1 id="rnd-basic-navigate"><title>Navigation</title>
       <para>
          To navigate through the menues, you may either use your mouse, or the
          keyboard. Keyboard naviagtion is done via the up-, down-cursor-keys
          and select items with the return-key. You'll find that much more comfortable
          when playing, because you save a lot of time searching your mouse.
        </para>
    </sect1>
    
    <sect1 id="rnd-basic-play"><title>Playing the game</title>
      <para>
        To start the game, simply select "Start Game" in the main-menu (surprise!).
        In the main-window the selected cave will appear with the player in the
        center (if possible).
      </para>
      <para>
        You can control your player with the cursor-keys per default. Your player
        has the ability to take the contents of an adjacent field (called 
        snapping or grabbing) if you hold the left shift-key while pressing
        in a direction. If you have collected any dynamite, you can place it
        again with the right shift keys. These keys are only the default-bindings,
        you may change these to whichever you like in the Setup-Menu.
      </para>
      <para>
        The status-window to the right will tell you some facts. The topmost panel
        tells you the
        number of the current level, or cave, you are playing, directly above the
        number of Emeralds you need to collect before the exit opens. Below this
        there's the dynamite-counter above a field labels "Keys". In some levels you
        may encounter doors that can be opened only after you've collected a key
        of a certain color (possible are: red, yellow, green and blue). The
        "Keys"-display helps you to keep track of which colors you already have.
        Below this are the counters for score and time. The first is quite obviuos.
        The purpose of the time-counter depends on the level you are playing. 
        If it has a time-limit, the counter will count and down you'll die
        when it reaches 0. Otherwise it will count up.
      </para>
    </sect1>
    
    <sect1 id="rnd-basic-chooselevel"><title>Choosing a Levelset</title>
      <para>
        When you first start Rocks'n'Diamonds you will start with the Tutorial-Levelset
        that conists of about 10 tutorial levels to introduce you to the basic game
        principles.
      </para>
      <para>
        After playing the tutorials, you may try the other levelsets. If you select "Levels"
        in the main-menu, you can choose alternate levelsets.
      </para>
    </sect1>

  </chapter>
  
  <chapter id="rnd-menu"><title>The Menu-Structure</title>
    <sect1 id="rnd-menu-name"><title>Name</title>
      <para>
        Change your players name (the one that will be entered into the highscore-tables)
      </para>
    </sect1>
    <sect1 id="rnd-menu-level"><title>Level</title>
      <para>
        By selecting "Level" you enter the levelset-selector. If you press the
        left/right-keys you change the level currently selected for play.
      </para>
    </sect1>
    <sect1 id="rnd-menu-hof"><title>Hall Of Fame</title>
      <para>
        Here you can see the top-players for the current level.
      </para>
    </sect1>
    <sect1 id="rnd-menu-creator"><title>Level Creator</title>
      <para>
        Enters the Level Creator. See <xref linkend="rnd-creator"/>.
      </para>
    </sect1>
    <sect1 id="rnd-menu-info"><title>Info Screen</title>
      <para>
        The Info Screen contains short information for most game elements on several pages.
      </para>
    </sect1>
    <sect1 id="rnd-menu-start"><title>Start Game</title>
      <para>
        Select this item to start a game.
      </para>
    </sect1>
    <sect1 id="rnd-menu-setup"><title>Setup</title>
      <sect2 id="rnd-menu-setup-game"><title>Game Settings</title>
        <para>
          <table frame="all"><title>Game Settings and their meanings</title>
            <tgroup cols="3">
              <thead>
                <row>
                  <entry>Setting</entry>
                  <entry>Possible Values</entry>
                  <entry>Description</entry></row>
              </thead>
              <tbody>
                <row>
                  <entry>Team-Mode</entry>
                  <entry>on/off</entry>
                  <entry>on: Multiplayer, off: Singleplayer</entry>
                </row>
                <row>
                  <entry>Handicap</entry>
                  <entry>on/off</entry>
                  <entry>When on, you cannot play any higher level than the last finished one.</entry>
                </row>
                <row>
                  <entry>Timelimit</entry>
                  <entry>on/off</entry>
                  <entry>When on, the player dies when the time is up.</entry>
                </row>
                <row>
                  <entry>Auto-Record</entry>
                  <entry>on/off</entry>
                  <entry>Turn this to on, when you want every game you play recorded.</entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-editor"><title>Editor Settings</title>
        <para>
          Here you can select the groups of items you want to see in the level-creator.
          Those groups are:
          <simplelist>
            <member>Boulderdash</member>
            <member>Emerald Mine</member>
            <member>More</member>
            <member>Sokoban</member>
            <member>Supaplex</member>
            <member>Diamond Caves</member>
            <member>DX-Boulderdash</member>
            <member>Characters</member>
            <member>Custom Elements (1-128)</member>
            <member>More Custom Elements (129-256)</member>
            <member>Headlines</member>
            <member>User Defined</member>
          </simplelist>
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-graphics"><title>Graphics</title>
        <para>
          <table frame="all"><title>Graphics Settings</title>
            <tgroup cols="3">
              <thead>
                <row>
                  <entry>Setting</entry>
                  <entry>Possible Values</entry>
                  <entry>Description</entry></row>
              </thead>
              <tbody>
                <row>
                  <entry>Fullscreen</entry>
                  <entry>on/off</entry>
                  <entry>Toggles fullscreen and windowed mode</entry>
                </row>
                <row>
                  <entry>Scroll Delay</entry>
                  <entry>on/off</entry>
                  <entry>?</entry>
                </row>
                <row>
                  <entry>Soft Scroll</entry>
                  <entry>on/off</entry>
                  <entry>on: 50 fps (?) off: ???</entry>
                </row>
                <row>
                  <entry>Quick Doors</entry>
                  <entry>on/off</entry>
                  <entry>???</entry>
                </row>
                <row>
                  <entry>Toons</entry>
                  <entry>on/off</entry>
                  <entry>...</entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-sound"><title>Sound &amp; Music</title>
        <para>
          <table frame="all"><title>Sound and Music Settings</title>
            <tgroup cols="3">
              <thead>
                <row>
                  <entry>Setting</entry>
                  <entry>Possible Values</entry>
                  <entry>Description</entry></row>
              </thead>
              <tbody>
                <row>
                  <entry>Simple Sound</entry>
                  <entry>on/off</entry>
                  <entry>...</entry>
                </row>
                <row>
                  <entry>Sound Loop</entry>
                  <entry>on/off</entry>
                  <entry>...</entry>
                </row>
                <row>
                  <entry>Game Music</entry>
                  <entry>on/off</entry>
                  <entry>...</entry>
                </row>
              </tbody>
            </tgroup>
          </table>
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-custom"><title>Custom Artwork</title>
        <para>
          Rocks'n'Diamonds allows you to use your own (or other peoples)
          graphics, sound effects or music instead of the default one when playing.
        </para>
        <para>
          On the upper half of this config-screen you can choose which graphics,
          sounds and music you want to have. The "Classic Graphics" ("Classic
          Sounds", "Classic Music" respectively) is the default. Select these
          points to get a menu of items to choose of (may vary depending on your
          installation).
        </para>
        <para>
          Any levelsets that bring their own artwork however will per default
          be displayed in that one. In the lower half of the screen you can
          override that behaviour. But to be honest: if a levelset has own
          custom artworks, the half of the fun will get lost if you chose
          another one.
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-input"><title>Input Devices</title>
        <para>
          This menu is for configuring the control for the up to four players
          that can play on a single computer.
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-key"><title>Key Shortcuts</title>
        <para>
          Here you can select the keys you want to have as shortcut for
          load, save and pause.
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-exit"><title>Exit</title>
        <para>
          Returns to the main-menu with the new settings, but without saving
          them to disk, i.e. they will get lost when you quit the game.
        </para>
      </sect2>
      <sect2 id="rnd-menu-setup-save"><title>Save and Exit</title>
        <para>
          Returns to the main-menu with the new settings and saves them to
          disk.
        </para>
      </sect2>
    </sect1>
    <sect1 id="rnd-menu-quit"><title>Quit</title>
      <para>
        Select this item to quit the game.
      </para>
    </sect1>
  </chapter>

  <chapter id="rnd-creator"><title>The Level Creator</title>
    <sect1 id="rnd-creator-TODO"><title>ToDo</title>
      <para>
        here be muuuuuch information :-)
      </para>
    </sect1>
  </chapter>

  <chapter id="rnd-levelsets"><title>Managing Levelsets</title>
    <sect1 id="rnd-levelsets-basic"><title>Basics</title>
      <para>
        Levels in Rocks'n'Diamonds are organized in levelsets. You can find 
        these in two places on your harddisk. The first one is the folder where
        Rocks'n'Diamonds is installed. The other on is your personal
        Rocks'n'Diamonds-Folder, which is
        <filename>My Documents\Rocksndiamonds</filename> for Windows systems and
        <filename>~/.rocksndiamonds</filename> for Unix-like systems.
        In each of those there is a subfolder <filename>levels</filename> in 
        which the levelsets are stored.
      </para>
      <para>
        Each levelset may contain up to 1000 levels. Additionally there may be
        own graphics, sounds and music. See <xref linkend="rnd-ca"/> for more
        information about those.
      </para>
    </sect1>
    <sect1 id="rnd-levelsets-conf">
      <title>The <filename>levelinfo.conf</filename> file</title>
      <para>
        Each levelset-directory contains a file named <filename>levelinfo.conf</filename>
        which holds all necessary informations about the levelset. It is an
        ordinary text-file that can be edited with your favorite text-editor.
      </para>
      <para>
        Here is for example the <filename>levelinfo.conf</filename> file for
        my own tutorial levels:
      </para>
        <example><title>example <filename>levelinfo.conf</filename> file</title>
        <screen>file_identifier:              ROCKSNDIAMONDS_LEVELINFO_FILE_VERSION_3.0

name:                         Tutorial NB
author:                       Niko Boehm
levels:                       40
first_level:                  1
sort_priority:                90
level_group:                  false
readonly:                     true</screen></example>
      <para>
        Now follows a short overview of all possible options. A short tabular
        synopsis can be found in <xref linkend="levelinfo-conf-tab"/>.
      </para>
      <segmentedlist>
        <segtitle>Option</segtitle>
        <segtitle>Description</segtitle>

        <seglistitem>
        <seg>file_identifier</seg>
        <seg>
          This option must be present and should be
          ROCKSNDIAMONDS_LEVELINFO_FILE_VERSION_<emphasis>X.Y</emphasis>
          where X.Y is the version of &rnd; you are using.</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>name</seg>
        <seg>
          This is the name of the levelset. If this is missing the name
          of the directory in which it is located will be used.</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>name_sorting</seg>
        <seg>(I honestly have no idea what this good for)</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>author</seg>
        <seg>Who is the Author of this levelset.</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>imported_from</seg>
        <seg>From which game (if any) were these levels imported.</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>levels</seg>
        <seg>This is the number of levels in this levelset.</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>first_level</seg>
        <seg>
          Which number has the first level of this levelset. Mostly 0 or 1.
        </seg>
        </seglistitem>
        
        <seglistitem>
        <seg>sort_priority</seg>
        <seg>
          The sort-priority affects 2 things. First: where in the list of
          levelsets will this set be found (smaller numbers stand higher).
          Second: As what kind of levelseries this will be classified.
          Detailed Informations can be found in
          <xref linkend="levelinfo-conf-pri"/>
        </seg>
        </seglistitem>
        
        <seglistitem>
        <seg>latest_engine</seg>
        <seg>
            If set to <quote>true</quote> &rnd; uses always the latest 
            game engine, regardless of the level version. Usually this is 
            not what you want, since it may break tapes.
        </seg>
        </seglistitem>
        
        <seglistitem>
        <seg>level_group</seg>
        <seg>
          If set to <quote>true</quote>, this directory will not be searched 
          for levels,
          but further subdirectories containing levelsets.
        </seg>
        </seglistitem>
        
        <seglistitem>
        <seg>readonly</seg>
        <seg>
          Defines if these levels are allowed to be changes in the level
          creator or not.
        </seg>
        </seglistitem>
        
        <seglistitem>
        <seg>graphics_set</seg>
        <seg>Name of the graphics set to be used for this levelset</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>sounds_set</seg>
        <seg>Name of the sound set to be used for this levelset</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>music_set</seg>
        <seg>Name of the music set to be used for this levelset</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>filename</seg>
        <seg>(I honestly have no idea what this good for)</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>filetype</seg>
        <seg>(I honestly have no idea what this good for)</seg>
        </seglistitem>
        
        <seglistitem>
        <seg>handicap</seg>
        <seg>
          Set to <quote>false</quote> to always disable handicap for this
          levelset.
        </seg>
        </seglistitem>
        
      </segmentedlist>
      
      <table frame="all" id="levelinfo-conf-tab">
        <title>options for <filename>levelinfo.conf</filename></title>
        <tgroup cols="3">
          <thead>
            <row>
              <entry>Options</entry>
              <entry>Type</entry>
              <entry>Default</entry></row>
          </thead>
          <tbody>
            <row>
              <entry>file_identifier</entry>
              <entry>string</entry>
              <entry>(see description)</entry>
            </row>
            <row>
              <entry>name</entry>
              <entry>string</entry>
              <entry>ANONYMOUS</entry>
            </row>
            <row>
              <entry>name_sorting</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>author</entry>
              <entry>string</entry>
              <entry>ANONYMOUS</entry>
            </row>
            <row>
              <entry>imported_from</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>levels</entry>
              <entry>number</entry>
              <entry>0</entry>
            </row>
            <row>
              <entry>first_level</entry>
              <entry>number</entry>
              <entry>0</entry>
            </row>
            <row>
              <entry>sort_priority</entry>
              <entry>number</entry>
              <entry>999</entry>
            </row>
            <row>
              <entry>latest_engine</entry>
              <entry>true/false</entry>
              <entry>false</entry>
            </row>
            <row>
              <entry>level_group</entry>
              <entry>true/false</entry>
              <entry>false</entry>
            </row>
            <row>
              <entry>readonly</entry>
              <entry>true/false</entry>
              <entry>true</entry>
            </row>
            <row>
              <entry>graphics_set</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>sounds_set</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>music_set</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>filename</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>filetype</entry>
              <entry>string</entry>
              <entry></entry>
            </row>
            <row>
              <entry>handicap</entry>
              <entry>true/false</entry>
              <entry>true</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

      <table frame="all" id="levelinfo-conf-pri">
        <title>levelinfo priorities</title>
        <tgroup cols="3">
          <thead>
            <row>
              <entry>Range</entry>
              <entry>Color</entry>
              <entry>Description</entry></row>
          </thead>
          <tbody>
            <row>
              <entry>010-099</entry>
              <entry>blue</entry>
              <entry>Tutorial Levels</entry>
            </row>
            <row>
              <entry>100-199</entry>
              <entry>red</entry>
              <entry>Classic Levels</entry>
            </row> 
            <row>
              <entry>200-299</entry>
              <entry>green</entry>
              <entry>Contributed Levels</entry>
            </row>
            <row>
              <entry>300-399</entry>
              <entry>red</entry>
              <entry>Private Levels</entry>
            </row>
            <row>
              <entry>400-499</entry>
              <entry>green</entry>
              <entry>Boulder Dash Levels</entry>
            </row>
            <row>
              <entry>500-599</entry>
              <entry>yellow</entry>
              <entry>Emerald Mine Levels</entry>
            </row>
            <row>
              <entry>600-699</entry>
              <entry>green</entry>
              <entry>Supaplex Levels</entry>
            </row>
            <row>
              <entry>700-799</entry>
              <entry>yellow</entry>
              <entry>DX-Boulderdash Levels</entry>
            </row>
          </tbody>
        </tgroup>
      </table>
    </sect1>
  </chapter>
  
  <chapter id="rnd-ce"><title>Custom Elements</title>
    <sect1 id="rnd-ce-TODO"><title>ToDo</title>
      <para>
        here be muuuuuch information :-)
      </para>
    </sect1>
  </chapter>
  
  <chapter id="rnd-ca"><title>Custom Artwork</title>
    <sect1 id="rnd-ca-graphics"><title>Custom Graphics</title>
      <para>
        here be some information
      </para>
    </sect1>
    <sect1 id="rnd-ca-sound"><title>Custom Sound Effects</title>
      <para>
        here be some information
      </para>
    </sect1>
    <sect1 id="rnd-ca-musik"><title>Custom Music</title>
      <para>
        here be some information
      </para>
    </sect1>
  </chapter>
  
  
  <chapter id="rnd-misc"><title>Miscellaneous</title>
    <sect1 id="rnd-misc-cmdline"><title>Command Line Parameters</title>
      <para>
        Here is the command-line help of rocksndiamonds:
        <screen>niko@avalon ~ $ rocksndiamonds --help

Usage: rocksndiamonds [OPTION]... [HOSTNAME [PORT]]

Options:
  -d, --display HOSTNAME[:SCREEN]  specify X server display
  -b, --basepath DIRECTORY         alternative base DIRECTORY
  -l, --level DIRECTORY            alternative level DIRECTORY
  -g, --graphics DIRECTORY         alternative graphics DIRECTORY
  -s, --sounds DIRECTORY           alternative sounds DIRECTORY
  -m, --music DIRECTORY            alternative music DIRECTORY
  -n, --network                    network multiplayer game
      --serveronly                 only start network server
  -v, --verbose                    verbose mode
      --debug                      display debugging information
  -e, --execute COMMAND            execute batch COMMAND:

Valid commands for '--execute' option:
  "print graphicsinfo.conf"        print default graphics config
  "print soundsinfo.conf"          print default sounds config
  "print musicinfo.conf"           print default music config
  "print editorsetup.conf"         print default editor config
  "print helpanim.conf"            print default helpanim config
  "print helptext.conf"            print default helptext config
  "dump level FILE"                dump level data from FILE
  "dump tape FILE"                 dump tape data from FILE
  "autoplay LEVELDIR"              play level tapes for LEVELDIR
</screen>
        Please note that the <parameter>--display</parameter>-option is only
        working (and useful) on Unix-like systems.
      </para>
    </sect1>
  </chapter>
  

</book>

<!-- vim:shiftwidth=2:expandtab:
-->
