.TH cbzone "" "" "X Application"
.PC "Fight a tank battle"
\fBcbzone [\fIoptions\^\fB]\fR
.PP
.HS
.SH Options
.IC "\fB\-bd \fIcolor\fR"
Set the color of the border to \fIcolor\fR
.IC "\fB\-bg \fIcolor\fR"
Set the color of the background to \fIcolor\fR
.IC "\fB-blocks \fIn\fR"
Scatter
.I n
pyramidal blocks around the battlefield
.IC "\fB\-bw \fIpixels\fR"
Set the width of the border to \fIpixels\fR
.IC \fB\-coptersonly\fR
Play a ``practice'' game in which you fight only helicopters
.IC \fB\-cursor\fR
Provide a cursor
.IC \fB\-defaultcolor map\fR
On color displays, use the default color map
.\"The game will
.\"still try to use as many colors as possible, but will not
.\"allocate a private color map to do so.
.IC "\fB\-delay \fIn\fR"
Set the normal delay to
.IR n ,
which must lie between 0 and ten, inclusive
.IC \fB\-help\fR
Print a help message
.IC "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number \fIscreen\fR
of \fIserver\fR on host system \fIhost\fR
.IC "\fB\-fg \fIcolor\fR"
Set the color of the foreground to \fIcolor\fR
.IC "\fB\-fn \fIfont\fR"
Use \fIfont\fR in the display
.IC "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to \fIgeometry\fR
.IC "\fB\-landers \fIn\fR"
Let the enemy have
.I n
landers
.IC "\fB\-missiles \fIn\fR"
Give yourself
.I n
missiles
.IC \fB\-mono\fR
Run the game in monochrome, even under a color server
.IC \fB-nofullscreen\fR
Run the game in a window just large enough to play in
.\"Otherwise, when using a
.\"private color map, the border tends to change to some unintended
.\"color (probably yellow).
.IC \fB\-nooutput\fR
Tell \fBcbzone\fR not to write text output to a tty;
this option is useful when you run the game from a menu
.IC \fB\-original\fR
Reset defaults to the original arcade version; this overrides all
options other than \fB\-quiet\fR and \fB\-delay\fR
.IC \fB\-quiet\fR
Do not ring the bell during the game
.IC \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors
.IC "\fB\-salvos \fIn\fR"
Give yourself
.I n
salvos; the default is the number of tanks or missiles, whichever
is greater
.IC \fB\-scores\fR
Print the score as you accumulate points
.IC "\fB\-tanks \fIn\fR"
Let the enemy have
.I n
tanks; the default is two
.IC \fB\-version\fR
Print the version
.IC "\fB\-xrm \fIresourcestring\fR"
Use \fIresourcestring\fR to define a resource
.HE
.B cbzone
is a combat game.
You command a tank that can fire missiles; you can look out a window
and have a control panel with a radar screen and warning indicators.
The battlefield is a plain around which is scattered a number of pyramidal
structures.
You try to shoot tanks, supertanks (like tanks, only faster and with a smaller
silhouette), cruise missiles, landers, and helicopters
before they shoot you.
.PP
You give commands to the game primary through the mouse.
Shifting the mouse corresponds to moving a joystick:
moving the mouse forward, backward, left, or right moves your tank in that
direction; moving the mouse in the 10-o'clock direction moves the tank
forward and to the left, moving it to 2 o'clock moves it forward
and to the right; and so on.
The joystick instrument on the lower right of your control panel
shows your tank's movement and rotation.
.PP
Pressing the left-mouse button fires a salvo.
Pressing the right-mouse button toggles between low and high
sensitivity:
the ``sensitivity'' determines how sensitive the joystick is to the motion
of the mouse
Pressing the middle-mouse button (or, on two-button mice, clicking both
buttons simultaneously) centers the joystick and stops your tank.
.PP
You accumulate points based on the number of enemy craft you destroy.
At the end of the game, high scores are displayed.
Your score is eligible for the high-score list only if you
played with the default options \(em with the exceptions that
the delay can be zero through five, and quiet mode can be on.
.SH "Command-line Options"
.B cbzone
recognizes the following command-line options:
.IP "\fB\-bd \fIcolor\fR"
Set the color of the border to
.IR color .
.IP "\fB\-bg \fIcolor\fR"
Set the color of the background to
.IR color .
.IP "\fB-blocks \fIn\fR"
Scatter
.I n
pyramidal blocks around the battlefield.
.IP "\fB\-bw \fIpixels\fR"
Set the width of the border to
.IR pixels .
.IP \fB\-coptersonly\fR
Play a ``practice'' game in which you fight only helicopters.
.IP \fB\-cursor\fR
Provide a cursor.
Typically, this is useful only if motion can take you out of the window.
This circumstance can occur with multiple displays or virtual root windows.
.IP "\fB\-defaultcolormap\fR"
On color displays, use the default color map.
The game will still try to use as many colors as possible, but will not
allocate a private color map to do so.
.IP "\fB\-delay \fIn\fR"
Set the normal delay to
.IR n ,
which must lie between zero and ten, inclusive.
.IP \fB\-help\fR
Print a help message.
.IP "\fB\-display \fIhost\^\fB[:\fIserver\^\fB][.\fIscreen\^\fB]\fR"
Display the client's window on screen number
.I screen
of
.I server
on host system
.IR host .
.IP "\fB\-fg \fIcolor\fR"
Set the color of the foreground to
.IR color .
.IP "\fB\-fn \fIfont\fR"
Use
.I font
in the display.
.IP "\fB\-geometry \fIgeometry\fR"
Set the geometry of the program's window to
.IR geometry .
The term ``geometry'' means the dimensions of the window and its location
on the screen.
.I geometry
has the form \fIwidth\(muheight\(+-xoffset\(+-yoffset\fR.
.IP "\fB\-landers \fIn\fR"
Let the enemy have
.I n
landers at once.
.IP "\fB\-missiles \fIn\fR"
Let the enemy have
.I n
cruise missiles at once (default, one).
.IP \fB\-mono\fR
Run the game in monochrome, even under a color server.
.IP \fB-nofullscreen\fR
Run the game in a window just large enough to play in.
This option works well under some conditions, such as playing in monochrome
or when using the default color map.
When you use a private color map, the border tends to change
to some unintended color (probably yellow).
Note that
.B cbzone
cannot run in a window smaller than 1024\(mu768 pixels; if your screen size
is smaller than this, then you will see only the portion of the window that
fits onto your screen.
.IP \fB\-nooutput\fR
Tell \fBcbzone\fR not to write text output to a tty.
this option is useful when you run the game from a menu.
.IP \fB\-original\fR
Reset defaults to the original arcade version.
This overrides all options other than
.B \-quiet
and
.BR \-delay .
.IP \fB\-quiet\fR
Do not ring the bell during the game.
.IP \fB\-rv\fR
Simulate reverse video by exchanging the foreground and background colors.
.IP "\fB\-salvos \fIn\fR"
Let yourself fire up to
.I n
salvos at once.
The default is the number of enemy tanks or cruise missiles,
whichever is greater.
.IP \fB\-scores\fR
Print the score as you accumulate points.
.IP "\fB\-tanks \fIn\fR"
Let the enemy have
.I n
tanks at any one time.
The default is two.
.IP \fB\-version\fR
Print the version of your game.
.IP "\fB\-xrm \fIresourcestring\fR"
Use
.I resourcestring
to define a resource.
.SH "Keyboard Commands"
Although you usually interact with
.B cbzone
via the mouse, you can also give the following commands via the keyboard:
.IP \fBC\fR 0.3i
Continue playing after a pause.
.IP \fBP\fR
Pause playing the game.
.IP \fBI\fR
.IS \fB<spacebar>\fR
Pause the game and iconify the window.
Note that the window manager is free to ignore this.
.IP \fBQ\fR
.IS \fB<ctrl-C>\fR
Quit
.BR cbzone .
On three-button mice, you can also do this by pressing the left and right
buttons simultaneously.
.IP \fBR\fR
Redraw the screen.
.SH "Resources"
You can modify the game by setting resources, either through the
command-line option
.BR \-xrm ,
or through the command
.BR xrdb .
.PP
The following lists the resources you can set, and their default settings.
Note that the game's class is
.BR Cbzone :
.nf
.sp \n(pDu
.ta 2.0i 4.0i 6.0i
\fIResource	Resource	Resource\fR
\fIName	Subclass	Argument	Default\fR
.tc . 0.1i
bgcolor	BgColor	colorname	black
blocks	Blocks	int	8
coptercolor	EnemyColor	colorname	green
coptersonly	Coptersonly	Bool	False
crackcolor	CrackColor	colorname	skyblue
cubecolor	BlockColor	colorname	yellow
cursor	Cursor	Bool	False
cursorcolor	CursorColor	colorname	skyblue
defaultcolormap	DefaultColormap	Bool	False
delay	Delay	int	5
esalvocolor	SalvoColor	colorname	red
fadingcolors	FadingColors	int	True
fgcolor	FgColor	colorname	skyblue
fullscreen	Fullscreen	Bool	True
help	Help	Bool	False
horizoncolor	HorizonColor	colorname	gray50
joystickcolor	JoystickColor	colorname	red
landercolor	LanderColor	colorname	green
landers	Landers	int	4
maxcolors	MaxColors	int	0 (all)
missilecolor	EnemyColor	colorname	green
missiles	Missiles	int	1
mono	Mono	Bool	False
mooncolor	MoonColor	colorname	gray50
original	Original	Bool	False
output	Output	Bool	True
psalvocolor	SalvoColor	colorname	skyblue
pyramidcolor	BlockColor	colorname	yellow
quiet	Quiet	Bool	False
salvos	Salvos	int	2
scannercolor	ScannerColor	colorname	green
scores	Scores	Bool	False
supercolor	EnemyColor	colorname	green
tankcolor	EnemyColor	colorname	green
tanks	Tanks	int	2
textcolor	TextColor	colorname	red
version	Version	Bool	False
xhaircolor	XHairColor	colorname	gray50
.fi
.PP
The following gives some example of how to modify
.B cbzone
by setting resources.
In general, they work only on a color screen.
.PP
The first example
makes all enemies (tanks, supertanks, missiles, and copters) magenta, and
lets the enemy have three tanks or supertanks at a time:
.DM
	cbzone  -tanks 3 -xrm "*EnemyColor: magenta"
.DE
.PP
The next example puts the game into ``stealth'' mode:
that is, all tanks and supertanks are black against a black background,
although you can still see them on your radar screen:
.DM
	cbzone -xrm "*tankcolor: black" -xrm "*supercolor: black"
.DE
.PP
In the next example,
objects that fade (blocks, landers, or enemies) will use
five shades of a particular color.
.DM
	cbzone \-xrm "*fadingcolors: 5"
.DE
.PP
The default is to use as many shades as possible.
To use no fading colors, use the option
.DM
	\-xrm "*fadingcolors: 1"
.DE
.PP
The command
.DM
	cbzone -xrm "*maxcolors: 20"
.DE
.PP
tells
.B cbzone
to use 20 colors.
As a rule,
.B cbzone
tries to obtain as
many colors as it can, either from the default color map or by making
its own color map.
If not enough color cells are available,
.B cbzone
reduces the number of different colors first by
reducing the number of fading colors; then giving groups of
objects the same color.
.PP
Finally, the command
.DM
	cbzone -xrm "*maxcolors: 2" -xrm "*fgcolor: skyblue"
.DE
.PP
runs
.B cbzone
with a black background (which is the default) and makes all other objects
sky blue.
.SH "Environmental Variables"
.B cbzone
uses the environmental variable
.BR PAGER ,
which tells it which pager to use to display the message-of-the-day and the
help file.
.SH "See Also"
.B
X applications
.R
.SH Notes
Tanks can move through one another.
Some regard this as a feature.
.PP
.II "Revenaugh, Justin S."
.B cbzone
is an X implement of the game
.BR Battlezone ,
which was originally written in FORTRAN by
Justin S. Revenaugh.
.II "Mummert, Todd W."
It was rewritten in C by
Todd W. Mummert (mummert+@cs.cmu.edu), who also added code to let you
set the number of objects and enemies, and to widen support for color.
.II "Pulley, Harry"
.II "Leonard, Jim"
It was ported to \*(CO by Harry Pulley,
and re-ported to \*(CO 4.2 by Jim Leonard.
