	xspaceball - multi-player, multi-display space battles

	              (C) 1991, Kevin Laws

	This program may be copied from, hacked, changed, eaten, stepped on,
	or thrown away as you desire provided no profit is generated thereby.
	Enjoy.

	For those who want to get started right away:

	All it needs to compile is whatever you have as your X11 library
	and the functions "sin" and "cos" (usually in /lib/libm.a).  The
	program was originally written on a Hewlett Packard 9000/300 series
	and the compile command there is:

		cc -O -o xspaceball xspaceball.c -lX11 -lm

	The -O optimizes the code and can be omitted if your system doesn't
	support it.

	To run the game, type:

	     xspaceball <display1> <display2> [<display3> [<display4>]]

	or

	     xspaceball <display1> <robotlvl1> [<robotlvl2> [<robotlvl3>]]

	Where <robotlvl#> is the level of skill of the robot you play against,
        with 1 as the best and 9 as the worst.

	It will default to "spaceball" mode rather than "shoot-em-up" mode.
	For more on these, see below.

	For example:

	     xspaceball max:0.0 homer:0.0

	would start a game with two players, one on the display "max" and 
	the other on the display "homer".

	     xspaceball max:0.0 1 5

	would start a game with 1 player and two robots, one a very good
	player, and the other average.

	Anywhere from one to four can play. At the start of each round, the 
	program will wait for all players to press their space bars to 
	indicate that they are ready to play.

	If you don't have two people, don't give up yet!  There are robots
	to play against.  To put a robot in the game, replace any display
	name with either a number between 1 and 9 or "robot" then a number
	between 1 and 9.  The number indicates the speed of the robot, 1
	being the fastest and 9 being the slowest.  So, to play against a
	mid-range robot, type:

	     xspaceball unix 5

	(The "unix" is because "unix:0.0" on any display should use the
	current display automatically.  If this is not so, replace the
	"unix" with the name of the display to run on).

	Any display can be replaced with a robot, so it is possible to
	play a game with any combination of real players and robots.  If
	a game is played with only four robots, the main display will 
	automatically be used as a "viewport", just watching the robots play.
	This is not a bad way to see how the game is played.
	Commands:

	   If you have a keypad:

	       8 - Thrust
	       2 - Stop completely
	       6 - Rotate Right		9 - Rotate Right Quickly
	       4 - Rotate Left		7 - Rotate Left Quickly
	       5 - Fire

	   If you don't or don't like using it:
	       L - Thrust
	       / - Stop Completely
	       . - Rotate Right		> - Rotate Right Quickly
	       , - Rotate Left		, - Rotate Left Quickly
	       SPACE - Fire

	Configurations:

	    - (MINUS) - Decrease the time interval between updates
	    + (PLUS)  - Increase the time interval between updates

	         These are to allow the program to work with different
		 displays.  Sometimes, you'll find that the display is
		 very, very jerky.  In that case, you'll want to increase
		 the time interval to give the other displays time to
		 catch up.  If you find that play is too slow, then
		 decrease the time interval.  A good balance can be
		 found rather easily.

	    S - Toggle "relative" shots.  Normally, shots are fired
	        at the shot speed plus the speed the ship that fired
		the shot is travelling.  "S" can toggle between that
		and a "fixed speed" shot, always travelling at a 
		constant speed.

	    P - Toggle planet.  This adds (or removes) a planet in the
	        center of the screen.  If the planet is on and the player
		hits it, then the player will take damage just as
		if hit by a shot.

	    G - Increase gravity.  Initially, there is no gravity.  This
	        increases the gravity making a stronger pull towards the
		center.

	    g - Decrease gravity.  (See above).  Gravity can be decreased
	        to the point of negative gravity, with the center actually
		REPULSING objects approaching it!

	    A - Add asteroid.  This adds an asteroid to the game, copied
	        directly from X-asteroids.  It cannot be shot, but it can
		hit and damage a ship!

	    a - Remove asteroid.  Removes previously added asteroids.

	    B - Toggle bounce mode.  Initally, "bounce" is on, meaning
	        that when a ship hits the edge of the playing field, it
		bounces back from it.  If bounce is off, the player
		travels through to the other side.

	    Z - Add a ball to play (if previously removed).  See below for
	        the different rules in effect when the ball is in play.

	    z - Remove the ball from play and go to "shoot-em-up" mode.
	   

	The program was written loosely based on the SPACEWAR arcade game, 
	but using the vector graphics and rotation functions found in 
	"X-Asteroids" by Phil Goetz.

	Various other functions were inserted to make this more than
	a blast-em-up game.  There are two main "play-modes" to the game.
	Without the ball in play, the game resembles spacewar fairly closely.
	The options are there: planet, gravity, borders, etc.  In this game,
	every player tries to shoot every other player.  I don't remember
	exactly, but I believe I let each player be shot 4 times before they
	died.  When there is only one player left, the score counters are
	updated and everybody starts again.

	The other mode is "spaceball" mode.  In this mode, there is a small
	spaceball (actually a direct rip-off of the small asterod shape in
	Phil Goetz's X-asteroids).  The object of the game is to pick up the
	spaceball by running into it and then make a point by flying into your
	goal (the square of your color) with it.  Alternatively, you can shoot
	your ball into the goal.  When you shoot while holding the ball, the
	ball will shoot away from you, but remain the same color as your ship.
	It will return to a neutral white as soon as another player hits it
	with a shot or it bounces off a wall.

	Shooting somebody just messes up their ship for a short time, and if
	they have the ball, it returns it to neutral.  Points are only awarded
	for getting the ball into the goal, not for shooting other players.
	In this game, shooting another player is only the means to an end.

	NOTE: I am putting this out into the wide world 'as-is'.  I will be
	unable to coordinate changes, fixes, and additional features or
	support it in any way, so if anybody wants to take over that task,
	they are welcome to it.  In the meantime, this is the only known
	or planned version.
