---------------------------------------------------------------------

    ThreeD 0.02 Manual by Sheldon Young
    Copyright (c) 1994 CSC Three
    Walk in a three dimensional maze.

---------------------------------------------------------------------

About this program

    As the last lab  in  Computer  Science 216 (Data Structures) the
    three  of  us  in  the class chose to do a unique project.  Mike
    drew up a proposal for a walk through a mae in the first-person,
    much  like  the  games Wolfenstein, Doom, and Ultima Underworld.
    The instructor agreed and after a lot of intense effort and long
    nights, here it is.  The  program itself isn't really useful for
    anything, but the source would make a wonderful tutorial.

    Except for a tiny amount of inline assembly it  was  written  in
    C++  using  object  oriented  techniques.  It is a little slower
    than the data/function model, but not by too large of an amount.
    On  a  VESA  local-bus  video  486DX/33  texture  mapped mode is
    acceptable,  but  barely  (6  frames  per  second).   It  can be
    optimized almost everywhere, as speed wasn't our  goal.   Still,
    not bad for around two weeks of work!

    One  of  the  people  involved was supposed to do the routine to
    load  mazes off disk.  Due to some sort of communication trouble
    it was never completed.   In  all  fairness  this  is  the  only
    routine this person had to do...

    There are some interesting features:

        1) The person bounces as he/she moves similar to Doom.
        2) There are  five different view modes, from texture mapped
           3D to overhead.
        3) Can be controlled by the mouse.
        4) ALL of the program was written from scratch.
        5) All of the source  is  included  for you to play with and
           learn from.
       
Legal Stuff

    As soon as a piece of software is created  in  Canada  it  is
    automatically  copyrighted.   Meaning  that we have no choice in
    copyrighting this work, however we do license it using the terms
    and conditions in the  GNU  Public License.  Basically it states
    you can do almost anything with this (as long as the changes are
    noted) except sell it for a profit.  Please  read  the  included
    file LICENSE.GNU for the complete information.
   
    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 1,  or
    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., 675 Mass Ave,  Cambridge,  MA  02139,
    USA.
  
Using the Program

    The program itself is very easy to use.  The mouse movements are
    fairly obvious and  the  keyboard  is  the familiar IJKL layout.
    Here are the controls in their entirety:

    Mouse:

        Forward/Backwards - Move player forwards or backwards
        Right/Left        - Move player right or left
        Right button      - Move laterally (strafe)
        Middle button     - Move backwards
        Left button       - Move forward
       
    Keyboard:

        I - Move forward
        K - Move backward
        J - Move left
        L - Move right
        U - Move laterally left
        O - Move laterally right

        Escape - Quit
        H      - Help
        Tab    - Toggle through display mode
        D      - Chose display mode
        T      - Redisplay title screen
        C      - Center player
  
Defines

    There are several #define's you can use to toggle a  variety  of
    options.  To use them  simply  make  sure  you #define it global
    because we don't guarantee it will never move.  A good place  is
    in your compiler options or in the file BASIC.H.

    Debugging and testing
        NDEBUG                Turns off all sanity checks.
        BENCHMARKS            Add speed test before the title screen.
        DRAWVIEW_SHOWHEIGHT   Show bouncing height on screen.
        TMAZE_TEST            Create a small built-in maze.

    Options
        DRAWVIEW_FORCE        Disable smart updating DrawView().
        PLAYERMOVE_FASTMOUSE  Define for speedy mouse movement.
  
Internal Conventions

    Formatting:  The  formatting  convention  in  the  source  is  a
    combination of Mike Lyons and Sheldon Young's style, sometimes a
    mixture.  Both styles should be  relatively easy to read.  About
    halfway  through  I  started adopting some of Mike's conventions
    (smaller function headers mostly).

    Measurement: For  the  purpose  of  this  lab  we considered the
    internal  world  coordinates  to  be  in  centimeters, so if you
    create a wall 300 units high it would be 3 meters tall.

    Angles: Angles are in  what  we  call PseudoAngles.  Rather than
    use  very  slow  floating  point  math  we  decided  to  use the
    convention that angles will go from 0 to USHRT_MAX, representing
    0 to pi radians (0 to 360 degrees) respectively.
  
About the Authors

    The  authors  are  all  students at the College of New Caledonia
    (Prince George, BC, Canada).  We have all agreed to release this
    program in this form.  If you wish to  contact  one  of  us  try
    electronic mail first, it is more likely to  get  a  speedy  and
    meaningful reply.   You  may  call,  but  please  keep  it  at a
    reasonable hour.
            
        Sheldon Young               (604)963-7067
        PO Box 2931                 FidoNet:  Sheldon Young 1:359/298.1
        Prince George, BC           Internet: sheldon.young@datex.com
        V2N 4T7
        Canada

        Mike Lyons                  (604)964-0725
        7833 Piedmont Crescent      FidoNet: Mike Lyons 1:359/262.1
        Prince George, BC           Internet: mike.lyons@datex.com
        V2N 3K8
        Canada

Known Problems

    No  collision  detection  with  the walls.  See that brick wall?
    Walk right on through it!

    Texture mapping doesn't scale  length-wise.   The bricks are the
    same width close as the are far away when looking down a wall.

    Texture mapping doesn't take into account how much of  the  wall
    was clipped off.

    Texture mapping could use an speed boost.
    
    A way to load mazes would be nice.
