home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / diverace.zip / README.TXT < prev    next >
Text File  |  1995-08-28  |  10KB  |  245 lines

  1.   DIVERACE a Game-Programming example for Virtual Pascal.
  2.  
  3.   This is Freeware
  4.  
  5.   Author  :  Michael Mrosowski
  6.              Fidonet:  2:240/5022.1
  7.              EMail:    lagaffe@offline.sh.sub.de
  8.  
  9.   Last Chg:  27.08.95
  10.  
  11. *****************************************************************************
  12.   Preface:
  13.   --------
  14.   This game and the sourcecode, as far as it is not copyrighted by other
  15.   parties is free for use. It is released for the purpose to promote game
  16.   programming under os/2.
  17.  
  18.   This software and accompanying materials are distributed "AS IS" without
  19.   warranty, express, implied or statutory, including but not limited to any
  20.   implied warranties of merchantability and fitness for a particular purpose.
  21.   In no event shall anyone involved with the creation and production of this
  22.   product be liable for indirect, special, or consequential damages, arising
  23.   out of any use thereof or breach of any warranty.
  24.  
  25.   Warning!:
  26.   ---------
  27.   This software is only roughly tested and its use can lead caused either
  28.   by incompatibilities or programming errors to a system halt. So be sure to
  29.   save all work before first starting the game.
  30.  
  31. *****************************************************************************
  32.  
  33.   Notes about the Game:
  34.   ---------------------
  35.   Diverace is a little car driving game. It's not really finished yet but
  36.   it's already some fun to play.
  37.  
  38.   You drive a little vehicle together with some computer controlled cars
  39.   around a course. Bumping into them is the usual method to get them
  40.   out of your way, and they do the same with you :).
  41.  
  42.   The only goal is currently to get past all others and drive some good
  43.   times. I recommend a joystick for best control.
  44.  
  45.   Notes about the Game Options:
  46.   -----------------------------
  47.  
  48.     Sound-Mixing:
  49.     -------------
  50.     I hope it works on your computer. I've tested it currently only with the
  51.     original Gravis Drivers (0.31a) where it works satisfyingly. It uses
  52.     up some computing time, so disabling it may speed up the game.
  53.     For safety reasons the sound mixing is currently disabled while the
  54.     game-frame has no focus (even while you are in the menu). It is re-
  55.     enabled when the frame gets the focus back.
  56.  
  57.  
  58.     Controls:
  59.     ---------
  60.     The mouse control is relative to the mouse movement on the whole screen.
  61.     You will see a crosshair on the game screen indicating the control
  62.     position. Moving the mouse up accelearates, down brakes and left and right
  63.     steers the car (guess what direction).
  64.     The joystick control assumes you centered the joystick on the start of the
  65.     game. The joystick position is signaled with a crosshair on the game
  66.     screen. The acceleration & brakes are digital so it doesn't matter if the
  67.     crosshair doesn't reach the top or the bottom of the screen.
  68.     If steering to one side doesn't work correctly trim your joystick in that
  69.     direction and restart the game.
  70.  
  71.     Watch-Only:
  72.     -----------
  73.     In this mode you don't have to drive. You can move around and watch the
  74.     automatic cars fighting.
  75.  
  76.     Display Sound-Buffer:
  77.     ---------------------
  78.     If Sound-Mixing is enabled, you can see the result of the sound mixing
  79.     on the game screen. (May slow down the game a bit).
  80.  
  81.     Translate Colors:
  82.     -----------------
  83.     Turning off this option can speed the game up when used in 256 color mode
  84.     and SNAP 1:1 Mode. But it usually results in some color distortion.
  85.  
  86.     Pause if lost Focus:
  87.     --------------------
  88.     It is a little bit dangerous to disable this function. If the game
  89.     continues and you start a full-screen session then ther will be a problem
  90.     getting back. Try pressing CTRL-ESC and wait up to a minute. The WPS
  91.     should be coming up again.
  92.  
  93.     Frame Rate:
  94.     -----------
  95.     The maximum/optimal frame rate in this game is 18Fps.
  96.  
  97.   Keys in Game:
  98.   -------------
  99.     F1: Snaps the Game Window to the resolution of the internal screen-buffer
  100.     F2: Snaps the Window to the double size of the internal resolution
  101.     F4: Snaps the Window to the Full Screen Width.
  102.  
  103.     F3: Ends the Game
  104.     F5: Pauses the Game
  105.  
  106.  
  107.   Compatibility:
  108.   --------------
  109.   You need:
  110.     OS/2 Warp 3.0 (or newer)
  111.     MMPM/2 installed.
  112.     A DIVE capable Video-Card. (The 8514 Drivers do not support DIVE).
  113.  
  114.     Optional: Soundcard & Joystick.
  115.  
  116.   My Testing Environment:
  117.     OS/2 Warp 3.0
  118.     AMD 486 DX/2, 16MB
  119.     ATI Mach 64 VLB
  120.     Gravis Ultrasound (with Gravis Drivers 0.31a)
  121.     Results: 1:1 -> 18fps with 60-70% System load
  122.              1:2 -> 14fps with 100%   System load
  123.  
  124.   Problems:
  125.   ---------
  126.   No Screen updates during game. End the game with F3 and start PULSE.
  127.   Check out if some other program (i.e. a bad configured dos-window) uses
  128.   100% of the CPU-Time. In this case there will be no game screen-updates,
  129.   because they run at idle priority (delta +20).
  130.  
  131.   The sound mixing currently does not work with the gravis manley drivers
  132.   because they are too "intelligent" and ignore any later changes in the
  133.   buffers of the playlist. Other drivers may experience the same problem.
  134.  
  135.   If the System hangs with 1:2 Screen (or bigger) this may be a DIVE
  136.   Problem. I experienced it some time with a Cirrus Logic card. I experienced
  137.   the same effect with SHOW.EXE from IBM, so it doesn't seem to be my
  138.   fault :).
  139.  
  140.   Joystick flickering. Implementing the usage of the Joystick driver could
  141.   help resolving this problem.
  142.  
  143. *****************************************************************************
  144.   Notes about the Source Code:
  145.   ----------------------------
  146.  
  147.   unzip the sourcecode with the option -d (for directories).
  148.  
  149.   Do not expect a full documented full-blown 100% perfect code. This is just
  150.   an old dos game which i ported to os/2. But i hope this game can at least
  151.   be an example how to use multithreading and MMPM to write a game.
  152.  
  153.   If you want futher development, don't ask me. You have the code so you
  154.   can do it ;-).
  155.  
  156.  
  157.   Used techniques:
  158.  
  159.  
  160.   PALETTE:
  161.   --------
  162.   The Physical Palette is set as good as possible. But usually OS/2 does not
  163.   let all colors being set. This does not apply to TRUE-Color where no
  164.   palette is used.
  165.  
  166.  
  167.   SOUND:
  168.   ------
  169.   Currently a playlist is used with two alternating buffers. Sound quality
  170.   is at 11khz 8-Bit Mono. Mixing is currently set to 6 channels.
  171.   If you want Stereo or 16-Bit you will have to extend the mixing routines.
  172.   The playlist concept may not work correctly on every sound-driver because
  173.   the soundbuffers are alternatively updated (always the not-played buffer).
  174.  
  175.  
  176.   DIVE:
  177.   -----
  178.   The the Dive-Blitter runs in an extra thread at nearly idle priority.
  179.   It usually runs fastest in 256 colors at 1:1 resolution. Without the
  180.   Color translation option the thruput is nearly doubled, but the colors are
  181.   distorted. Color translation off usually does not improve performance if
  182.   the display is other than 1:1.
  183.  
  184.   3D:
  185.   ---
  186.   Stone-Aged. The 3D-Routines are quite proprietary for this game. The 3D
  187.   routines write to a 256-colors frame buffer. The screen resolution can be
  188.   adjusted in the file DREID.PAS. You will notice still some german comments
  189.   in the file, i didn't have the time yet to translate all of them.
  190.  
  191.   The 3D Part turns only around the y-axis. All Objects are made up of
  192.   triangles or squares. The cars are the only objects that are sorted in a
  193.   little list by distance to the viewpoint and displayed furthest first.
  194.  
  195.  
  196.  
  197.   What is still to do:
  198.     DIVE:    The new Fullscreen DIVE interface is not yet implemented.
  199.              Look for the file DIVEFS2.ZIP for docs. As an alternative could
  200.              be used VIO Fullscreen-Access (see the fire.pas example) from a
  201.              spawned os/2 fs-session & passing the frame-buffer via
  202.              shared-memory.
  203.  
  204.     JOYSTICK:The game uses direct port io which ist not the best method.
  205.              Look for the files JOYSTICK.ZIP and JOYDOCS.ZIP for a OS/2
  206.              MMPM joystick driver.
  207.  
  208.     SOUND:   A playlist with alternatively updated datablocks and
  209.              cuepoint-operations is used. This takes much proc-time for
  210.              message processing etc. There is a new example for direct-
  211.              driver access. Look for DIRAUD.ZIP for documentation.
  212.  
  213.              The Sound-Part is only roughly tested and may not run
  214.              with some drivers. For the GUS it works with the Gravis drivers
  215.              but not with the manley-drivers. The Problem here is that
  216.              the driver is reading the playlist-buffer once and then is
  217.              ignoring any changes in the buffer.
  218.  
  219.     ERRORS:  Error processing is minimal or not-existing in this example.
  220.  
  221. ***************************************************************************
  222.  
  223.     Where to put files.
  224.     Files in LIB to your LIB directory.
  225.     Files in OUT to your OUT directory.
  226.     Files in WORK to your working directory or the VP directory.
  227.     Copy the Game files (except the .exe) to your work-directory for
  228.     debugging.
  229.  
  230.     Turn Stack-Checking off in the Compiler settings.
  231.     Link as PM-Application.
  232.  
  233.     The Compiler is: Virtual Pascal Version 1.0 Beta (#003)
  234.                      (i applied no fixes yet)
  235.                      from : Vitaly Miryanov
  236.  
  237.  
  238.     Used sources of information -> Credits:
  239.       SHOW.C of IBM for dive-programming.
  240.       The MM4EMX package of Marc E.E. van Woerkom for the MCI-Interface.
  241.       The plug-n-play sound source from Semir Patel.
  242.  
  243.  
  244.  
  245.