Compiling
---------

BattleBall is written to compile and run on Unix / X11 Windows
platforms.  To compile, make any needed modifications to the Makefile
and then type

  make

at a shell prompt.  A 'battleball' binary should appear in the current
directory.

BB should compile out-of-the-box with g++ versions 2.7.2 and later.
Other compilers may require minor changes to the source code.

BB uses the Standard Template Library (STL).  This isn't an issue for
newer C++ compilers, which now come with STL built-in.  In particular,
g++ 2.7.2 and later all include STL.  If your compiler doesn't include
STL, you'll need to get STL to compile BB.

BB now offers OpenGL support.  The Makefile is set up to link with
OpenGL (or Mesa) libraries.  However, you can still compile and run BB
without OpenGL.  See the comments in the Makefile for how to do this.

If you have problems running make, check that you are using the GNU
version of make (recommended).


Testing
-------

BattleBall has been compiled & tested on the following platforms:

Linux 2.0.27 / g++ 2.7.2
Linux 2.2.9  / g++ 2.91.66
Linux 2.2.10 / g++ 2.95.1
IRIX 6.5     / g++ 2.91.57
AIX 4.1.5    / g++ 2.8.1
SunOS 5.7    / g++ 2.8.1

There was one failure under AIX and g++ 2.7.2, in which BB compiled,
but the binary didn't run correctly.  However, g++ 2.8.1 generated a
correct binary.


Source notes
------------

The BattleBall source code distribution comes in three directories:

bsp/      A.T. Campbell's BSP C library, v1.0 (modified)
lib3d/    my 3-D modeling/rendering library (needs a real name :-)
bb/       BattleBall

The 3D modeling/rendering library in lib3d/ defines classes for
geometric primitives such as points, angles, polygons, and arbitrary
polygonal 3-D shapes.  The code in lib3d to rotate/transform and render
3-D shapes is heavily optimized for speed, short of resorting to
assembly language.  Lib3d contains no code specific to the game of
BattleBall, and was written with the goal of being reusable outside of
BB.  Lib3d now has limited OpenGL support.

The source code in bb/ implements all the gameplay of BB.  It has a
fairly nice (IMO!) object-oriented model for game objects and how they
behave/interact, which was new in BattleBall 2.0.

You may see the mysterious comment "-PAH" sprinkled liberally thoughout
the source code.  They mark places in the source code that have kludges
or that could use further work.


Good luck!
Philip Hardin
