
*** SpeedHack Contest entry: Water Kills (stupid name if there is one)


Water Kills is a multiplayer ship racing game written for the SpeedHack 1999
contest: games written in a weekend.

    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


*** Various info

Buoys are tracing a track on the water to guide ships through waypoints
to the finish.
Up to 4 players are allowed, and up to 256 ships total, including ASS
(Artifical Ship Sapience) controlled ships are allowed :)
Player input devices can be chosen amongst:
 - keyboard
 - mouse
 - joystick
Printscreen takes a shot to SpeedHack.pcx
You can specify any MIDI file you want to play with --midi
To get any help on command line options, try ./SpeedHack --help
There are a few ASSes, with skill ranging from 0 (Stupid) to 2 (crack). They
can be selected via --ass.

There are 6 ship types, each with different skills (speed, steering, crossing)
Ships have different skills: Here is a table rating each ship against engines
power, maniability (turning speed) and ability to cross obstacles. All marks
are in range 1 (terrible) to 5 (excellent):

                  Speed       Turn     Crossing
Arrow (0)      :    5           2         1
Catamaran (1)  :    2           3         2
Everglades (2) :    2           4         5
Medium (3)     :    4           3         3
Starship (4)   :    4           2         2
Zodiac (5)     :    3           5         2

(in parentheses is the index of the ship to be passed to --pship options)
There is wind too, which changes during the game.

There are nasty stripes in the water effect, but I've not found the flaw yet.
There sure are many other bugs, due to the number of options I've punched in,
and the resulting combination possibilities. I have not tested all of them, of
course :)


*** SpeedHack contest requirements:

So, I have met all three requirements (they were not a real constraint):
- There are command line parameters; try --help to see the list
- BEL is used whenever an error in the command line parameters, and to mark
  the start of the race after the initial countdown
- One of the tracks is named "29", for a reason. (and 29' is a pretty good time
  for this track ;)) (with the medium ship)


*** Requirements:

You will need a copy of Allegro. This was compiled with version 3.9.28.
Previous versions may or may not work. Some 3.9 do not.
Mouse and joystick supported, as well as sound cards. Try --help.
Sorry, but you will need a fast PC. I didn't bother to optimize it well,
since it was to be done in a quite limited amount of time. Anyway, I don't
think I could optimize it much more... Try fiddling with the resolution
switches (--width and --height)


*** Tracks:

There are 3 stock tracks: 29, rocks, closed.
Making your own is easy, tracks are 8 bit PCX files, of any size.
Pixels are color codes corresponding to the following:
0: nothing (plain water)
1: Buoy (surrounds the track)
2: Start point (invisible when playing)
3: Jumppad
4: Rock
5: Nenuphar
6: Speedpad
192-255: waypoints

Waypoints are the tricky part: a waypoint is a segment which ends two pixels
of the same color, between 192 and 255. The first one is 192, the second one
193, etc. Obviously, there is a limit of 64 waypoints. The finish is the last
waypoint (eg if there are two 192, two 193, and 2 194, the finish is the segment
between the two 194). No 'holes' are allowed. To pass a waypoint, a ship must
go through both pixels for that waypoint.
Stock tracks are straightforward, look at them to get a hold on that.


*** Credits:

Aaron Shutt - Organizer of the SpeedHack contest
Shawn Hargreaves - Allegro and demo data
Garett Thomson - MIDI tune (hope you don't mind, I've mailed you too late)
Mukesh Prasad - Fast line intersection algorithm, from Graphic Gems II
All SpeedHack contest entrants - For a nice coding weekend :)
Me - All the rest (code/gfx/sfx)

