	QDSF
	====

(Quick & Dirty Space Fight simulation)

Requirements:
=============
Uh, oh. Don't know for sure.

But you should at least have:

* Pentium CPU or compatible, at a reasonable speed 
  (> 500 MHz will hopefully give acceptable results)

* Windows9x/2000/XP

* OpenGL
  Any windows implementation should work, but some 
  3D cards require to have their own opengl32.dll in 
  the program's folder. There's an OpenGL that comes 
  with the more recent Windows versions (From 98 on,
  I think). That one will only use 3d accelerators
  if they are the primary device, otherwise it will
  emulate. And trust me, when Microsoft emulates, it
  ain't fast!
  If, on the other hand, you don't have a 3d card,
  maybe check out sgi's OpenGL for Windows.
  [I just found that it was deprecated, and I have no 
  idea how usable it actually is.]

* 3D accelerator card.
  (May work without one, but don't count on high performance!)

Installation:
=============
Just create a folder and extract the whole zip into it, 
preserving directory structure.
If you have a special opengl32.dll for your 3D card, put
it into that folder, too.

Running:
========
Run qdsf.exe.
You can pass a (complete) path to load a custom .VCD file.
Additionally, you can use the following options:

-Rx	Select screen resolution, where x is one of the 
	following:
	0	 320 x  240
	1	 400 x  300
	2	 640 x  480 (default)
	3	 800 x  600
	4	1024 x  768
	5	1152 x  864
  6 1280 x  960
  7 1280 x 1024
	If a resolution is not supported, OpenGL may either
	fail or provide 640 x 480.

-cl	Use low color depth (16bpp). Default is 24/32 bpp.
  If unsupported, OpenGL may use 24/32 bpp.

-cL Use low color depth (16bpp). Default is 24/32 bpp.
  If unsupported, OpenGL will fail.

-zl	Use low z-buffer depth (16bpp). Default is 24/32 bpp.
  If unsupported, OpenGL may use 24/32 bpp.

-zL Use low z-buffer depth (16bpp). Default is 24/32 bpp.
  If unsupported, OpenGL will fail.

-d	Enable dithering. Depends on hardware, but is only
  useful with -cl/-cL.
	OpenGL may ignore this flag.

-w	Windowed mode. Not all OpenGL implementations support
	this feature.
  If unsupported, OpenGL may run full-screen.

-W  Windowed mode. Not all OpenGL implementations support
	this feature.
  If unsupported, OpenGL will fail.

-F Fullscreen mode. If unsupported, OpenGL will fail.

-s	Software rendering mode. OpenGL may ignore this flag.

-S  Software rendering mode. OpenGL may not ignore this flag.

-j0 or -j- don't use joystick. Specify if you don't have a joystick or
	don't want to use it.

-m0 or -m- don't use mouse.

Uninstall:
==========
Just remove the folder you created when installing.

Keys:
=====

<Esc>: Exit.

Ship controls:
--------------

<Pad8> / <Pad2>: Pitch (Nose down / up)
<Pad4> / <Pad6>: Gear (Nose left / right)
<Pad7> / <Pad9>: Roll
<A>: Throttle up
<Z>: Throttle down
<Q>: Throttle off
<Backspace>: Full throttle
Cursor keys: Slide
<Space>: Fire lasers
<Alt>: Swap gear and roll
--- The above functions work only if there is no joystick support for them. ---
--- otherwise: ---
<Joystick X>: Gear
<Joystick Y>: Pitch
<Joystick Throttle>: Accelerate / decelerate
<Joystick Button 1>: Fire
<Joystick Button 2>: Swap gear / roll
<Joystick POV hat>: Slide

<W>: Select weapon
<X>: Weapon combine mode (single->twin->quad->all)

<F11>: Toggle movement stabilizer
When on, the stabilizer uses thrusters to set the ships velocity vector to
forward, at the speed selected with throttle controls.
When off, throttle controls thrusters directly.

<F12>: Toggle rotation stabilizer

<L>: Long-distance mode. When movement stabilizer is activated, the throttle
ranges from 0 to 200 m/s when off, and from 0 to 1000 m/s when on.
Use with care; the ship may not be very maneuvrable at high speeds.
Long-distance mode will not boost your acceleration. It simply enables you
to select higher velocities in stabilized mode (F11).

<Pad5>: Reset ship to origin

MFD's:
------

<1>/<2>: MFD 1 (left) mode
<3>/<4>: MFD 2 (middle) mode
<5>/<6>: MFD 3 (right) mode

Targeting:
----------
<T>/<Z>: Cycle targets
<R>: Nearest target
<U>: Target in front
<O>: Clear target

Viewpoint:
----------
<F1>: Pilot view
<F2>: Origin view
<F3>: Origin-to-ship view
<F4>: Fixed view
<F5>: Missile view (currently buggy, don't use)
<F6>: Pilot-to-missile view (currently buggy, don't use)

Visual options:
---------------
<C>: Randomize background color
<Shift> + <C>: Set background color to black
<D>: Randomize direct light color
<Shift> + <D>: Set direct light color to white
<S>: Toggle smooth shading
<B>: Toggle blending/transluciency

Quickstart:
===========

- Launch qdsf.exe.

- Select a ship using Left and Right keys.

- press <F1> to go to cockpit view.

- Push <R> to find the nearest target.

- Use high-speed mode (<L> key) to approach your target
  to about 2 km.

- Use the predictor icon to aim at you target.
  (looks like this:)
	< >
  The predictor shows you what direction your bullets
  will go to.
  The predictor is always somewhere between axis
  and velocity vector.
  Where exactly, depends on your current velocity,
  your ship's physics, and the laser you have selected.

- Blast the hell out of your target.

Selecting a ship:
=================
QDSF right now comes with 6 ship hulls. These are:

* F10 Light fighter <VESSEL00.VHD>
----------------------------------
  An average little space fighter, with enough slots to
  hold lasers and shields.

* R21 Recon fighter <VESSEL01.VHD>
----------------------------------
  Larger than the F10, lighter, but much slower rotation.
  Not very suitable for dogfight, but can be quite fast.

* GL/F Galagan fighter <VESSEL02.VHD>
-------------------------------------
  A very powerful assault fighter. 5 extra slots for jets
  or rotators, combined with very low weight, enable extremely 
  fast and aggressive configurations.
  A powerful weapon.

* F13 Multi-purpose fighter <VESSEL03.VHD>
------------------------------------------
  With lots of free slots, this ship can be configured to
  various needs, including heavy armament.
  Though very heavy, it rotates nicely.

* F13A Multi-purpose fighter <VESSEL04.VHD>
-------------------------------------------
  The F13, modified to carry even more weapons, at the cost
  of being even heavier, and less agile.

* X/F Xenarian Fighter <VESSEL05.VHD>
-------------------------------------
  An average fighter, suitable for many different setups.

* L/P LittlePod <VESSEL06.VHD>
------------------------------
  Very tiny spacecraft. Though not designed for fighting
  activities, this tiny vessel is sometimes used for recon
  missions.


Modifying your ship:
====================
The following file types can be found in the \data directory:

*.3DS (3D Studio)
-----------------
  QDSF should be able to read all kinds of 3DS files; however,
  it may be necessary to adjust face orientations using
  flipnor.exe.
  Note that not all features of the 3DS file format are supported.
  Thus, models may look different from what you expect.

*.VHD (Vessel Hull Definition)
------------------------------
  These define a vessel hull: Which 3DS model to use, number,
  location, and type of available slots, physics characteristics,
  and built-in slot items.

*.VCD (Vessel Configuration Definition)
---------------------------------------
  These specify a VHD to use, plus items to put on the slots.
  Invalid combinations are ignored.

*.SID (Slot Item Definition)
----------------------------
  These define any kind of slot item. The available parameters
  vary for the different item types. Look at the examples to
  see what you can do.

All numbers are understood to be in SI units, that means:
- Lengths: m (meters)
- Times: s (seconds)
- Masses: kg (kilogrammes)
- Rotation masses: kg / m
- Forces: N (Newton)
- Rotation forces: kg * rad / s^2 = N / m
- Speeds: m / s (meters per second)

Some handy constants to convert:

g = 9.81 m/s^2 (Earth gravitation)
1 km/h = 1m / 3.6s
(roughly: 1 km/h = 2.78 m/s)
1 m/s = 3.6 km/h

Colors are specified as RGB triplets, each component ranging
[0.0 ... 1.0] inclusive.

You can also use your own 3DS models, with the following 
things to watch out for.

Coordinates are: 
x-axis left to right
y-axis back to front
z-axis bottom-up

Unit is understood to be 1 meter. You can use <flipnor.exe> to check 
the normal orientations. Start it with your 3DS file as parameter.
Use the 'A' key to move the model to a comfortable distance and
cursor keys to rotate.
You can now:
- Select single faces using <TAB> and <Shift> + <TAB>
  The selected one will light up.
- Flip the selected face's normal with the <F> key
- Flip all face normals with <Shift> + <F>
- Save the modified model with <S>
- Delete the selected face with <Backspace>
  (Careful! There's no undo function yet!)
- Exit <Esc>
Faces that are green will be visible in the main program. 
Most modeling programs will give you either a completely red
model or a completely green one, depending on handedness and
back-face convention (both of which are completely arbitrary).
If not, correct per-face, otherwise just use <Shift>-<F> to
change all faces at once if necessary. Don't forget to check
all sides of the model (rotate it around a bit)!

Items mounted on a slot have their origin at the slot's 
connection point (defined in the .VHD file).
Their z-axis should point up, and there should not be any 
vertices with negative Z coordinates (because those could over-
lap with the ship).
Look at the ones provided to see what I mean.

Version history
===============

WIP 2003-09-04
--------------
  First version to be released.

WIP 2003-09-19
--------------
  Fixed quite some bugs.
  Added missiles.
  Changed weapon display.
  Added multi-weapon facilities with correct weapon-switching behaviour
  Added some weapons and jets.              

Credits
=======
Programmed in C++ using the following tools:

* The MinGW windows port of the GNU compiler collection
  (http://www.mingw.org/ and http://www.gnu.org/)
* Allegro (http://www.allegro.cc/)
* AllegroGL
* OpenGL (http://www.opengl.org/)

Programmed by Tobias Dammers.
3D models by Tobias Dammers.

http://www.home.deds.nl/~tdammers/
tdammers@deds.nl

Thanks to everybody on the allegro.cc forums for answering my questions.
