NOTE:		Make sure that you UNZIP this archive with an UNZIP utility that supports 		long file names!   Also, make sure you unzip with subdirectory expansion turned 
		on!



3D Water Combat
-------------------



What's new

April 25, 1998:
	Wrote random.c.
	Removed the outdated files: "i_WGL.c" and "win32_wgl.mak" from the archive.
	Added "What's new" section to the documentation.
	Minor changes to sources and documentation.
April 24, 1998:
	First release.



Introduction

	"3D Water Combat" is a game of high speed chase where players pilot their water craft at high speeds while attempting to destroy each other.  Players navigate a large playing area littered with obstacles such as buildings and mountains.  Collision with these obstacles results in damage to the player's vehicle.  Numerous items are also scattered throughout the playing field.  The player's "shield" is like the player's life-line.  When the player's shield is depleted to zero, the player's vehicle will explode.  (The player will 'die')  The player piloting the vehicle will be forced to start in a new vehicle without any items he/she might have previously picked up.  The player who was responsible for destroying the dead player is awarded one point.  If the dead player died as a direct result of his/her own mistake, that player is penalized one point.



Features

 	This release is incomplete.  Many important game-play elements are not present.  One of these is network based multiplayer support.  There are also several bugs present.  This release is really a playable demo of the game described above.  Among the features are an API portable rendering interface, inter-platform portability, a high quality outdoor 3d landscape combining both land and transparent water, a high performance Rendition V2x00 optimized OpenGL renderer, and full source code!  Currently supported platforms include Windows 95, Windows NT(untested), and SGI IRIX.  Virtually any platform supporting OpenGL and GLUT will work with a little modification. Future releases will continue to add features while possibly supporting more platforms and rendering APIs.  (such as Rendition's own RRedline)

	This release has been tested with Windows 95 and IRIX operating systems.  Under Windows 95, the release was found to work with the Rendition ICDs dated 3/20/98 and 4/21/98.  This release was also tested with SGI's OpenGL for Win32 and Microsoft's software OpenGL renderer.  Unfortunately, Microsoft's default OpenGL renderer is not 100% compatible with this release as there are some serious problems with the texture mapping.  Of all the platforms tested, this release performs best (by far) using the Rendition ICDs with Windows 95.



Getting started
(directions for Windows 95 users only)

	First make sure that your desktop is set to 16-bit color or higher.  Otherwise, "3D Water Combat" will not start.  If you want to use the accelerated OpenGL ICD that was provided with your card and you don't have it installed in your \windows\system directory, copy the file (opengl32.dll) into the directory that you unzipped the game in.  Notice that many vendors do not provide full OpenGL support in their ICDs!  This game will NOT run with a Quake only GL implementation like the one distributed with 3dfx cards!  Attempting to do so will result in strange image problems and/or crashing!  Those who are running the game without a vendor provided OpenGL ICD should download SGI's OpenGL, (http://www.meer.net/~gold/OpenGL/sgi-opengl.html) install it, copy \windows\system\opengl.dll into the directory you unzipped the game archive into, and rename the file to "opengl32.dll".  To start the game, run the main executable called "contest.exe" from the directory that you unzipped the game into.  If all goes well, the game should start and you should see a nice water scene with buildings and a status bar at the bottom of the screen.

	"3D Water Combat" has been written to take full advantage of the features present on the Rendition V2x00 based video cards.  These features include:  gourad-shaded-alpha-blended-perspective-correct-texture-mapping, hardware fog, bilinear-filtering, and anti-aliased points and lines.  Your card may not support all of the features that are used by the game.  Features that are unsupported are emulated in software which is very slow, even for the fastest CPUs!  In order to improve performance on slower cards, the keys F1 through F4 are provided to allow the user to customize what 3D features are used.  F1 is used to toggle blending.  Blending is used to make objects appear to be semi-transparent.  F2 is used to toggle textures.  Disabling textures can result in a huge performance increase on systems without hardware texture mapping.  Unfortunately, the game is extremely ugly without textures.  F3 is used to toggle the fog effect.  F4 toggles between point-sampled texture mapping and bilinear-filtered texture mapping.  Bilinear-filtered texture mapping looks much better than point-sampled texture mapping.  Many 3d cards don't support bilinear-filtering however.  Software texture mappers generally perform much better using point-sampling as well.

	Another way to increase performance is to decrease the window size that the "3D Water Combat" runs in.  When the game starts, it runs in full screen mode which is really just a window the size of the desktop.  Using the 'f' key toggles between "full-screen" and "windowed" mode.  Within windowed mode, you can use the mouse to resize the window to your liking.  Running the game will open a text window (if one isn't open already) which displays the average frame rate since the game was started.  Using this number, you can tune the parameters as well as benchmark between different systems.  As a benchmarking example, my system usually runs at between 25 and 30 frames per second at 800x600x16bit depending on which version of the Rendition ICD I use.  My system is an AMD K6-200 with a Hercules Thriller 3D 4MB video card.  With software rendering on my K6, I get about 1 frame every 5 seconds with all the features turned on!  Using no fog, no blending, and point-sampled textures with a 320x240 window, I usually get around 10fps with software rendering.



Playing the game (demo)

	Both the keyboard and the mouse are used to control your vehicle.  The UParrow key increases the vehicle's thrust to full.  The DOWNarrow key decreases the vehicle's to zero.  The LEFTarrow and RIGHTarrow keys allow the player to adjust the thrust in increments.  Using the LEFTarrow key, the player can also travel in reverse.  The manner in which the mouse affects game play is based on the location of the cursor relative to the window.  Moving straight ahead is accomplished by keeping the mouse pointer in the center of the window.  The vehicle is capable of high speed flight as well as slow controlled 'cruising' through the water.  Controlling the vehicle is slightly different while in flight.  While riding on the water, moving the pointer to the left or right sides of the window causes the vehicle to turn left or right.  The closer the pointer is to the edge of the window, the more steep the turn will be.  While in the air, moving the pointer to the right or left edge of the screen causes the vehicle to bank.  Maintaining a slight bank will cause the vehicle to turn.  More severe banks will causes the vehicle to turn faster.  Moving the pointer to the bottom and top of the window allow the player to increase and decrease the altitude of the vehicle.

	Maneuvering is a simple task, with practice.  Cruising on the water is easiest to learn.  Use the mouse to make turns in order to avoid obstacles.  While flying is more difficult to master, it allows the player to move almost twice as fast, reach more interesting areas of the map, and fly over many obstacles.  In order to fly, the vehicle must be moving at a minimum speed.  Watch the speed indicator as you cruise over the water.  Making frequent turns slows down your overall speed.  To start flying, set your thrust to full and try to cruise in a straight line.  When the speed indicator reaches the white "lift line", (in the middle of the gauge) move the mouse into the lower portion of the window.  While in the air, be careful not to lose too much speed or else you will lose altitude and eventually stop flying.  As your vehicle is a 'water craft', cruising over exposed land could be fatal.  If the game appears to 'restart' suddenly, you probably crashed.  (Death scenes aren't implemented yet :)

	Obstacles to avoid include the various buildings, exposed portions of the ground, and the large wall surrounding the playing area.  It is possible to fly over some of the lower buildings and mountains.  Take care when flying low or while flying over particularly high obstacles.  A quick "daredevil" run could BE YOUR LAST!  (Good thing this is a video game...you just lose a point)



Source Code

	When you are no longer amused with the game and you want to see how this thing works, you can take a look at the included source code and even modify it!  Here's some information:


Coding style:	Unlike any other perhaps?  I happen to like indenting brackets with the rest of 		the block.  I apologize if this makes things more difficult to read.

Source files:	The basic convention for naming the source files:  "r_" files are for the rendering 		library sources.  (Currently only OpenGL is supported)  "i_" files are for specific 		platforms.  (i.e.: WGL, GLUT... etc.)  "e_" files are logically separated from the 		rest of the code.  They are still necessary part.  All other files are common to all 		ports.

	Remember that this project is far from completion.  The current state of the source code is evident of this.  The quality of the source code should improve as the quality of the game improves.



Building the sources

SGI/IRIX users:
	Included is a make include file for your machines.  I'm in no position to provide any assistance in getting it to work on your machine.  The file I included is what "worked for me".  Make sure you have GLUT and the newest OpenGL libraries installed.  If your binaries are at least version 1.1, you can add "-DGL_BIND_PRESENT" to the CFLAGS line in the include file.  You may also experience some problems with CR/LF issues.  If you experience any compiler errors, try retyping the offending lines in the source files or makefiles.  Other than that, Good luck.  ;)

Other non-Windows platforms:
	Take a look at win32_glut.mak and sgi_glut.mak.  You'll have to make your own include file based off of these.  Linux users shouldn't have too much trouble compiling for GLUT with MesaGL.  As I said above, Good luck... ;)

Windows 95/NT:
 	The sources are being developed using the Mingw32 modification of the Cygnus Windows 32 port of the GCC compiler.  In order to build the sources "out-of-the-box", you'll need to download this compiler.  Go to: http://www.fu.is.saga-u.ac.jp/~colin/gcc.htm
Here you will find the Mingw32 patch as well as links and info for the Cygnus package.  Other Win32 compilers should be able to painlessly compile the sources as well.  Only a new makefile should have to be written.  I'm considering writing a makefile for LCC within the next few days.  MSVC users will have to do it themselves or find someone else unless the LCC makefile works.



Other Win32 info

	The source file "i_WGL.c" is currently outdated.  You will have to use the GLUT version.  In order to compile the GLUT version, you will need the GLUT header file and the GLUT link library.  A .ZIP file is provided which includes the GLUT .DLLs, .LIBs, and .Hs that you will need.  For those using GCC for Win32, "libglut32.a" is the appropriate link-time library for GLUT.  You might encounter some problems while attempting to compile this version.  It seems that Microsoft insists upon keeping all their header files in one directory instead of distributing them among different subdirectories like everyone else does.  As a result, your gl.h and glu.h files might not be found in the GL/ directory as the sources expect.  You may need to create a "GL" directory in your include tree and copy "gl.h" and "glu.h" as well as "glut.h" to it.

	Source code contributions are welcome.  Unfortunately as this project is still under heavy development, it is likely that I won't be able to incorporate the changes.  I'll take a look though.  For more information, please see my contact info below.




NOTE TO RENDITION:

	Assuming I don't place in the contest, I would still like to continue development of this project.  Would Rendition prefer that I send updates to the Rendition site?  Would it be better for me to maintain my own web page with news of updates as well as updated archives.  When network support is working, I would also like to set up a web page allowing players to find opponents online.  I will continue to provide full source code with no distribution / re-use restrictions as is requested in the official rules of the contest.  Could Rendition provide me with some details?  Even if I don't win, I would like to finish the entry.  :)




Contact info:

Stephen Edie 1621 Carol Drive
Loveland, CO 80537
nighttiger@usa.net
970-663-2320

The End
