/*  TankZone: My second Allegro game.
 *  Copyright (C) 2003  Tobi Vollebregt
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it 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.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *  See `License.txt', which contains a verbatim copy of the
 *  GNU General Public License, for details.
 *
 *  Please send your reaction to: tobivollebregt@hotmail.com
 */



TANKZONE
--------

This is the second game I started after getting in touch with the C 
programming language and the Allegro game programming library. This was in 
the year 2000. I used it merely as an experimentation environment for 
various programming stuff like artificial intelligence, random map 
generation and lighting in a tilemapped engine.

Because I started this game just after learning C and I continued changing 
major parts of it during two years, the game is probably full of bugs, so 
it's entirely at your own risk (see `License.txt' for details) to run the 
program or even compile it. But I wouldn't be publishing it here if it 
didn't seem stable to me. Development started on a Cyrix 233, 64M and 
continued on a AMD Duron 800, 128M and later 384M of RAM. The current 
release is tested succesfully using DJGPP (GCC 3.1) and M$VC 6.0. An older 
release has been tested succesfully using Linux.

I hope you enjoy (watching the AI) playing the game.



FILES
-----

Path + filename:    Content type:   Description:

data/Bas.bmp        Bitmap          A map by a friend
data/berlin.bmp     Bitmap          A map by my brother
data/default.bmp    Bitmap          Default map
data/castle.bmp     Bitmap          A map by my brother
data/Duco.bmp       Bitmap          A map by my brother
data/explode.dat    Alleg Datafile  Animation of an explosion
data/empty.bmp      Bitmap          A testing map
data/labyrinth.bmp  Bitmap          A map by myself
data/land.dat       Alleg Datafile  The entire tileset
data/map.pal        Palette         M$ Paint Palette, colors for maps
data/stadion.bmp    Bitmap          A map by my brother
data/Tobi.bmp       Bitmap          Another map by myself

src/ai.c            Sourcecode      Artificial intelligence
src/blend.c         Sourcecode      Blender functions
src/engine.c        Sourcecode      Tilemapper&Lighting functions
src/engine.h        Headerfile      Headers for src/engine.c
src/fade16.c        Sourcecode      Hicolor (15/16bpp) faders
src/fade16.h        Headerfile      Headers for src/fade16.c
src/flame.c         Sourcecode      Fire generation (from exflame.c)
src/intro.c         Sourcecode      3D intro code
src/jgmod.c         Sourcecode      JGMOD music (obsolete)
src/lighting.c      Sourcecode      Lighting functions
src/random.c        Sourcecode      Random map generation algo
src/samples.h       Headerfile      Allegro datafile object indices
src/sprite4.c       Sourcecode      4 bit sprite functions
src/sprite4.h       Headerfile      Headers for src/sprite4.h
src/sprite4a.asm    Assembler       Optimized draw_multiply_sprite4()
src/tankzone.c      Sourcecode      Main source file
src/tankzone.h      Headerfile      Main header file

License.txt         Plain text      GNU General Public License
Makefile            Makefile        GNU Makefile
readme.txt          Plain text      This file
tankzone.cfg        Configfile      Configuration data for TankZone
tankzone.exe        Executable      Win32 executable (needs alleg40.dll)



INSTALLING
----------

1)  Read this file and the file `License.txt'.

Windows users:
2)  Doubleclick on `tankzone.exe' to run.

DJGPP, Linux and Unix users:
2)  cd to the directory of TankZone.
3)  Make sure the empty directory `tmp' has been unzipped,
    create it otherwise.
4)  Type `make' to compile. (`Makefile' contains information about 
    possible targets.)
5)  Type `tankzone' to run.

Other platforms:
2)  Compile all sourcefiles (`src/*.c') and link them with Allegro.
3)  Run the executable you created in step 2.

The configuration file `tankzone.cfg' may be used to customize many things.
A brief description of the settings is available in there.



CONTROLS
--------

Intro:

ESC     Skip intro.
F1      Display rendering info like polygon count and vertex count.
F2      Toggle wireframe mode.
F3      Toggle backface culling.
F4      Toggle lighting.

Game engine:

ESC     Quit.
F3      Display AI debugging information.
F4      Display free/used amount of memory (DJGPP only).
F5      Reset gamespeed to 30 updates/second.
F12     Save screenshot to `shotNNNN.pcx'.
PAUSE   Pause game.
+       Increase gamespeed.
-       Decrease gamespeed.

Player 1 (left screen, red tank):

W       Speedup.
S       Slowdown.
A       Rotate gun to the left.
D       Rotate gun to the right.
Z       Switch headlight on/off.
L-Shift Fire.
L-Ctrl  Fix tankbase angle.

Player 2 (right screen, blue tank):

Arrow-keys  Speedup, slowdown, rotate gun.
/       Switch headlight on/off.
R-Shift Fire.
R-Ctrl  Fix tankbase angle.



WHAT YOU SEE
------------

After starting the program one or two dialogs will be displayed. One will 
ask you which map to load (if random map is disabled in `tankzone.cfg'). The 
other will ask you which time of the day you want to play, that is: the 
amount of light on the map.

Clicking OK in both dialogs will show the intro animation if it hasn't been 
disabled. If the intro is finished, the game will show up:

1)  The upper textline on the screen displays some information:

    last-second's-average-framerate (average-framerate) fps;
    hours:minutes:seconds; number-of-tilemap-engine-cache-hits% hits;
    (see also `tankzone.cfg')

2)  The left viewport displays everything around player 1, the red tank.
3)  The right viewport displays everything around player 2, the blue tank.

The bottom two textlines of the screen show information about the player in 
that viewport. Strength is the strength/health/hp of the tank. Damage is the 
amount of damage caused by the tank. Total is the accumulated strength of 
the tank and all turrets on it's side. Before SL, the number of Spent Lifes 
(that is: the number of times the tank was destroyed) is shown. AL stands 
for Average Lifetime (in seconds) of the tank.



NOTES
-----

You can get ALLEG40.DLL by downloading and running
http://www.allegro.cc/files/4.0.3/allegro-enduser-4.0.3-win32.exe

Pressing one of the tank-control-keys immediately while entering the game 
will prevent the AI from taking control.

AI will take over after one minute of no keypresses.

You may repair your tank by moving to a turret that's on your side.

Maps are regular .bmp format.

Use only the colors from `data/map.pal' when changing maps.

If the game runs too slow, disable `turrets_vs_turrets', and `buildabase', 
and/or enable the tile-cache or decrease it's accuracy. (see `tankzone.cfg')

Sound (ie. `samples.dat') has been stripped off due to legal reasons.

Don't forget to check the options in `tankzone.cfg'

Thanks to GNU for supplying GCC.

Thanks to Delorie for supplying DJGPP (http://www.delorie.com/djgpp).

Thanks to everyone who helped developping Allegro (http://www.allegro.cc).

Thanks to Duco, Bas, and MrDevlin, for creating some maps and betatesting 
the program.
