.TH roids "" "" "X Application"
.PC "Dodge and shoot the flying rocks"
\fBroids [-display \fIdisplay:number\^\fB]"
.PP
.B roids
is an implementation of the old Atari game ``Asteroids,'' on top of the
X11 windowing system.
.PP
When the game begins, you see with a black window.
Nothing happens until you move the keyboard's input focus into that window.
(How you do this depends on your window manager;
with most, you move the mouse cursor into the window.
In some, you must click a mouse button as well.)
Once things get going, you find yourself in control of a small,
triangular ship.
Large rocks wander across the screen; contact with a rock
destroys the ship.
You gain points by blowing up rocks with your gun as you dodge among them.
.PP
.B roids
recognizes the following keyboard commands from the keyboard:
.IP \fBz\fR
Rotate the ship to the left (counterclockwise).
It continues to rotat as long as you depress the key.
.IP \fBx\fR
Rotate the ship to the right (clockwise).
It continues to rotate as long as you depress the key.
.IP \fB,\fR
Apply thrust.
The ship accelerates in the direction it is pointed.
Thrusting continues as long as you depress the key.
.IP \fB.\fR
Fire a bullet.
You may have up to four bullets flying at once.
Bullets vanish after they have travelled a distance equivalent to the
width of the window.
.IP \fBQ\fR
Abort the game.
Note that this is a capital `Q'.
.PP
.\"If you prefer, you can control your ship with the mouse, as follows:
.\".IP "\fBLeft Button\fR"
.\"Rotate the ship to point toward the mouse cursor.
.\".IP "\fBMiddle Button\fR"
.\"Thrust.
.\".IP "\fBRight Button\fR"
.\"Fire a bullet.
.\".PP
You win 50 points when you blow up a big rock.
Medium rocks are worth 100 points, and small rocks are worth 200.
You begin the game with three ships.
You get another ship for every 10,000 points you win.
When all of your ships are destroyed, the game ends and your score
is displayed on the standard output.
.SH "Customizing Colors"
As with all standard X applications, you can customize
.B roids
by modifying properties in the resource manager.
This
almost always means editing the file
.BR $HOME/.Xdefaults .
.B roids
uses the following properties:
.IP \fBShipColor\fR
The color of the your ship.
The default is
.BR green .
.IP \fBRockColor\fR
The color of the rocks.
The default is
.BR gold .
.IP \fBShotColor\fR
The color of the bullets.
The default is
.BR red .
.IP \fBScoreColor\fR
The color in which the score is displayed.
The default is
.BR violetred .
.SH "Customizing Mouse and Keyboard"
The following names the actions used within
.BR roids ,
should you wish to link to them to a key
.\"or mouse
action other than the defaults given above:
.IP \fBgrab-focus\fR
Grab the input focus.
.\"This is only useful if bound to a mouse action.
.IP \fBrotate-left\fR
Rotating the ship to the left (counterclockwise).
.IP \fBrotate-right\fR
Rotate the ship to the right (clockwise)
.IP \fBrotate-off\fR
Stop either rotation.
.IP \fBthrust-on\fR
Start thrusting.
.IP \fBthrust-off\fR
Stop thrusting.
.\".IP \fBrotate-to-point\fR
.\"Begin rotating toward the mouse cursor.
.\"You can bind this only to a mouse-down button action.
.\".IP \fBstop-rotate\fR
.\"Cancel a currently executing rotate-to-point.
.\"This can be bound only to a mouse-up button action.
.\".IP \fBrotate-moved\fR
.\"Change the point to which to rotate.
.\"This can be bound only to a mouse-motion action.
.IP \fBfire\fR
Fire a shot.
.IP \fBquit\fR
Quit the game.
.PP
The following gives the settings for the default key bindings:
.DM
Roids*Roids*translation:	\en\e
     <Btn1Down>:	grab-focus() rotate-to-point()\en\e
     Button1<PtrMoved>:	rotate-moved()\en\e
     <Btn1Up>:		stop-rotate()\en\e
     <Btn2Down>:	thrust-on()\en\e
     <Btn2Up>:		thrust-off()\en\e
     <Btn3Down>:	fire()\en\e
     <KeyDown>z:	rotate-left()\en\e
     <KeyUp>z:		rotate-off()\en\e
     <KeyDown>x:	rotate-right()\en\e
     <KeyUp>x:		rotate-off()\en\e
     <KeyDown>\e\e,:	thrust-on()\en\e
     <KeyUp>\e\e,:	thrust-off()\en\e
     <KeyDown>.:	fire()\en\e
     Shift<KeyDown>q:	quit()
.DE
.SH "See Also"
.B
X,
X applications,
xasteroids
.R
.SH Notes
Do not use the mouse to run this game.
.PP
.\"The rocks look really stupid.
.\"Anyone have some good rock designs?
.\".PP
.\"You shouldn't have to re-run the program to play another game.
.\".PP
The game has no way to record your high score.
.PP
.B roids
does not handle different visuals, as a good X client should.
In particular, if you play this on a display with a StaticGrey visual,
you will probably not be able to see anything.
.PP
The default colors do not show up well on all displays.
.PP
This game has no enemy ships.
.\"In a way, this is a feature; I always despised the
.\"fact that people could get lots of points in the original ``Asteroids''
.\"by leaving one tiny little rock and blasting all the enemy ships.
.\".PP
.\"The code really could be a lot more efficient, and therefore work well
.\"over a larger variety of machines.
.PP
Copyright \(co 1989 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital Equipment
Corporation not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
Digital Equipment Corporation makes no representations
about the suitability of this software for any purpose.
It is provided ``as is'' without express or implied warranty.
.PP
The author claims that this game runs well only a fast workstation.
Tests under \*(CO on a 33-megahertz IBM-style personal computer show
that the game is still fast enough for most humans.
However, teenagers may still want the fast workstation.
.PP
.B roids
was written by
Terry Weissman (weissman@wsl.dec.com)
of the Western Software Laboratory, Digital Equipment Corporation.
He also wrote the original draft of this manual page.
