cleanup, add manual page
[unix-history] / usr / src / games / atc / atc.6
CommitLineData
efb4f774
KB
1. \" XP - exdented paragraph
2.de XP
3.RT
4.if \\n(1T .sp \\n(PDu
5.ne 1.1
6.if !\\n(IP .nr IP +1
7.in +\\n(I\\n(IRu
8.ti -\\n(I\\n(IRu
9..
10.\" Copyright (c) 1986 Ed James. All rights reserved.
11.\"
12.TH ATC 6 "January 1, 1986"
13.UC
14.SH NAME
15atc \- air traffic controller game
16.SH SYNOPSIS
17.B atc
18-[u?lstp] [-[gf] game_name] [-r random seed]
19.SH DESCRIPTION
20.LP
21.I Atc
22lets you try your hand at the nerve wracking duties of the air traffic
23controller without endangering the lives of millions of
24travelers each year.
25Your responsibilities require you to direct the flight of jets
26and prop planes into and out of the flight arena and airports.
27The speed (update time) and frequency of the planes depend on the
28difficulty of the chosen arena.
29.SH OPTIONS
30.LP
31.TP 8
32.B \-u
33Print the usage line and exit.
34.TP
35.B \-?
36Same as
37.B \-u.
38.TP
39.B \-l
40Print a list of available games and exit.
41The first game name printed is the default game.
42.TP
43.B \-s
44Print the score list (formerly the Top Ten list).
45.TP
46.B \-t
47Same as
48.B \-s.
49.TP
50.B \-p
51Print the path to the special directory where
52.I atc
53expects to find its private files. This is used during the
54installation of the program.
55.TP
56.B "\-g game"
57Play the named game. If the game listed is not one of the
58ones printed from the
59.B \-l
60option, the default game is played.
61.TP
62.B "\-f game"
63Same as
64.B \-g.
65.TP
66.B "\-r seed"
67Set the random seed. The purpose of this flag is questionable.
68.SH GOALS
69.LP
70Your goal in
71.I atc
72is to keep the game going as long as possible.
73There is no winning state, except to beat the times of other players.
74You will need to: launch planes at airports (by instructing them to
75increase their altitude); land planes at airports (by instructing them to
76go to altitude zero when exactly over the airport); and maneuver planes
77out of exit points.
78.LP
79Several things will cause the end of the game.
80Each plane has a destination (see information area), and
81sending a plane to the wrong destination is an error.
82Planes can run out of fuel, or can collide. Collision is defined as
83adjacency in any of the three dimensions. A plane leaving the arena
84in any other way than through its destination exit is an error as well.
85.LP
86Scores are sorted in order of the number of planes safe. The other
87statistics are provided merely for fun. There is no penalty for
88taking longer than another player (except in the case of ties).
44efdd62
KB
89.LP
90Suspending a game is not permitted. If you get a talk message, tough.
91When was the last time an Air Traffic Controller got called away to
92the phone?
efb4f774
KB
93.SH "THE DISPLAY"
94.LP
95Depending on the terminal you run
96.I atc
97on, the screen will be divided into 4 areas.
98It should be stressed that the terminal driver portion of the
99game was designed to be reconfigurable, so the display format can vary
100depending the version you are playing. The descriptions here are based
101on the ascii version
102of the game. The game rules and input format, however,
103should remain consistent.
104Control-L redraws the screen, should it become muddled.
105.SS RADAR
106.IP
107The first screen area is the radar display, showing the relative locations
108of the planes, airports, standard entry/exit points, radar
109beacons, and "lines" which simply serve to aid you in guiding
110the planes.
111.IP
112Planes are shown as a single letter with an altitude. If
113the numerical altitude is a single digit, then it represents
114thousands of feet.
115Some distinction is made between the prop
116planes and the jets. On ascii terminals, prop planes are
117represented by a upper case letter, jets by a lower case letter.
118.IP
119Airports are shown as a number and some indication of the direction
120planes must be going to land at the airport.
121On ascii terminals, this is one of '^', '>', '<', and 'v', to indicate
122north (0 degrees), east (90), west (270) and south (180), respectively.
123The planes will also
124take off in this direction.
125.IP
126Beacons are represented as circles or asterisks and a number.
127Their purpose is to offer a place of easy reference to the plane pilots.
128See 'the delay command' under the input section of this manual.
129.IP
130Entry/exit points are displayed as numbers along the border of the
131radar screen. Planes will enter the arena from these points without
132warning. These points have a direction associated with them, and
133planes will always enter the arena from this direction. On the
134ascii version of
135.I atc,
136this direction is not displayed. It will become apparent
137what this direction is as the game progresses.
138.IP
139Incoming planes will always enter at the same altitude: 7000 feet.
140For a plane to successfully depart through an entry/exit point,
141it must be flying at 9000 feet.
142It is not necessary for the planes to be flying in any particular
143direction when they leave the arena (yet).
144.SS "INFORMATION AREA"
145.IP
146The second area of the display is the information area, which lists
147the time (number of updates since start), and the number of planes you
148have directed safely out of the arena.
149Below this is a list of planes currently in the air, followed by a
150blank line, and then a list of planes on the ground (at airports).
151Each line lists the plane name and its current altitude,
152an optional asterisk indicating low fuel, the plane's destination,
153and the plane's current command. Changing altitude is not considered
154to be a command and is therefore not displayed. The following are
155some possible information lines:
156.IP
157 B4*A0: Circle @ b1
158.br
159 g7 E4: 225
160.IP
161The first example shows a prop plane named 'B' that is flying at 4000
162feet. It is low on fuel (note the '*'). It's destination is
163Airport #0.
164The next command it expects
165to do is circle when it reaches Beacon #1.
166The second example shows a jet named 'g' at 7000 feet, destined for
167Exit #4. It is just now executing a turn to 225 degrees (South-West).
168.SS "INPUT AREA"
169.IP
170The third area of the display is the input area. It is here that
171your input is reflected. See the INPUT heading of this manual
172for more details.
173.SS "AUTHOR AREA"
174.IP
175This area is used simply to give credit where credit is due. :-)
176.SH INPUT
177.LP
178A command completion interface is built into
179the game. At any time, typing '?' will list possible input characters.
efb4f774
KB
180Typing a backspace (your erase character) backs up, erasing the last part
181of the command. When a command is complete, a return enters it, and
182any semantic checking is done at that time. If no errors are detected,
183the command is sent to the appropriate plane. If an error is discovered
184during the check, the offending statement will be underscored and a
185(hopefully) descriptive message will be printed under it.
186.LP
187The command syntax is broken into two parts:
188.I "Immediate Only"
189and
190.I Delayable
191commands.
192.I "Immediate Only"
193commands happen on the next
194update.
195.I Delayable
196commands also happen on the next update unless they
197are followed by an optional predicate called the
198.I Delay
199command.
200.LP
201In the following tables, the syntax
202.B [0\-9]
203means any single digit, and
204.B <dir>
205refers to the keys around the 's' key, namely ``wedcxzaq''.
206In absolute references, 'q' refers to North-West or 315 degrees, and 'w'
207refers to North, or 0 degrees.
208In relative references, 'q' refers to -45 degrees or 45 degrees left, and 'w'
209refers to 0 degrees, or no change in direction.
210.LP
211All commands start with a plane letter. This indicates the recipient
212of the command. Case is ignored.
213.SS "IMMEDIATE ONLY COMMANDS"
214.RS
215.B "\- a Altitude:"
216.RS
217Affect a plane's altitude (and take off).
218.RE
219.RS
220.B "\- [0\-9] Number:"
221.RS
222Go to the given altitude (thousands of feet).
223.RE
224.B "\- c/+ Climb:"
225.RS
226Relative altitude change.
227.RE
228.RS
229.B "\- [0\-9] Number:"
230.RS
231Difference in thousands of feet.
232.RE
233.RE
234.B "\- d/\- Descend:"
235.RS
236Relative altitude change.
237.RE
238.RS
239.B "\- [0\-9] Number:"
240.RS
241Difference in thousands of feet.
242.RE
243.RE
244.RE
245.B "\- m Mark:"
246.RS
247Display in highlighted mode. Command is displayed normally.
248.RE
249.B "\- i Ignore:"
250.RS
251Do not display highlighted. Command is displayed as a
252line of dashes if there is no command.
253.RE
254.B "\- u Unmark:"
255.RS
256Same as ignore, but if a delayed command is processed,
257the plane will become marked. This is useful if you want
258to forget about a plane during part, but not all, of its
259journey.
260.RE
261.RE
262.SS "DELAYABLE COMMANDS"
263.RS
264.B "\- c Circle:"
265.RS
266Have the plane circle (clockwise by default).
267.RE
268.RS
269.B "\- l Left:"
270.RS
271Circle counterclockwise.
272.RE
273.B "\- r Right:"
274.RS
275Circle clockwise.
276.RE
277.RE
278.B "\- t Turn:"
279.RS
280Change direction.
281.RE
282.RS
283.B "\- l Left:"
284.RS
285Turn counterclockwise (45 degrees by default).
286.RE
287.RS
288.B "\- <dir> Direction:"
289.RS
290Turn ccw the given number of degrees.
291Zero degrees is no turn. A ccw turn
292of -45 degrees is 45 cw.
293.RE
294.RE
295.B "\- r Right:"
296.RS
297Turn clockwise (45 degrees by default).
298.RE
299.RS
300.B "\- <dir> Direction:"
301.RS
302Same as turn left <dir>.
303.RE
304.RE
305.B "\- L Left 90:"
306.RS
307Turn counterclockwise 90 degrees.
308.RE
309.B "\- R Right 90:"
310.RS
311Turn clockwise 90 degrees.
312.RE
313.B "\- <dir> Direction:"
314.RS
315Turn to the absolute compass heading given.
316The shortest turn will be taken.
317.RE
318.B "\- t Towards:"
319.RS
320Turn towards a beacon, airport or exit. The turn is
321just an estimate.
322.RE
323.RS
324.B "\- b/* Beacon:"
325.RS
326Turn towards the beacon.
327.RE
328.RS
329.B "\- [0-9] Number:"
330.RS
331The beacon number.
332.RE
333.RE
334.B "\- e Exit:"
335.RS
336Turn towards the exit.
337.RE
338.RS
339.B "\- [0-9] Number:"
340.RS
341The exit number.
342.RE
343.RE
344.B "\- a Airport:"
345.RS
346Turn towards the airport.
347.RE
348.RS
349.B "\- [0-9] Number:"
350.RS
351The airport number.
352.RE
353.RE
354.RE
355.RE
356.RE
357.SS THE DELAY COMMAND
358.LP
359The
360.B Delay
361(a/@)
362command may be appended to any
363.B Delayable
364command. It allows the controller to instruct a plane to do an action
365when the plane reaches a particular beacon (or other objects in future
366versions).
367.sp
368.RS
369.B "\- a/@ At:"
370.RS
371Do the given delayable command when the plane reaches the given beacon.
372.RE
373.RS
374.B "\- b/* Beacon:"
375.RS
376This is redundant to allow for expansion.
377.RE
378.RS
379.B "\- [0-9] Number:"
380.RS
381The beacon number.
382.RE
383.RE
384.RE
385.RE
386.SS "MARKING, UNMARKING AND IGNORING"
387.LP
388Planes are
389.B marked
390when they enter the arena. This means they are displayed in highlighted
391mode on the radar display. A plane may also be either
392.B unmarked
393or
394.B ignored.
395An
396.B unmarked
397plane is drawn in unhighlighted mode, and a line of dashes is displayed in
398the command field of the information area. The plane will remain this
399way until a mark command has been issued. Any other command will be issued,
400but the command line will return to a line of dashes when the command
401is completed.
402.LP
403An
404.B ignored
405plane is treated the same as an unmarked plane, except that it will
406automatically switch to
407.B marked
408status when a delayed command has been processed. This is useful if
409you want to forget about a plane for a while, but its flight path has
410not yet been completely set.
411.LP
412As with all of the commands, marking, unmarking and ignoring will take effect
413at the beginning of the next update. Do not be surprised if the plane does
414not immediately switch to unhighlighted mode.
415.SS EXAMPLES
416.RS
417.TP 16
418atlab1
419a: turn left at beacon #1
420.TP 16
421cc
422C: circle
423.TP 16
424gtte4ab2
425g: turn towards exit #4 at beacon #2
426.TP 16
427ma+2
428m: altitude: climb 2000 feet
429.TP 16
430stq
431S: turn to 315
432.TP 16
433xi
434x: ignore
435.RE
436.SH "OTHER INFORMATION"
437.LP
438Jets move every update; prop planes move every other update.
439.LP
440All planes turn a most 90 degrees per movement.
441.LP
442Planes enter at 7000 feet and leave at 9000 feet.
443.LP
444Planes flying at an altitude of 0 crash if they are not over an airport.
445.LP
446Planes waiting at airports can only be told to take off (climb in altitude).
447.SH "NEW GAMES"
448.LP
449The
450.B Game_List
451file lists the currently available play fields. New field description
452file names must be placed in this file to be 'playable'. If a player
453specifies a game not in this file, his score will not be logged.
454.LP
455The game field description files are broken into two parts. The first
456part is the definition section. Here, the four tunable game parameters
457must be set. These variables are set with the syntax:
458.IP
459variable = number;
460.LP
461Variable may be one of:
462.B update,
463indicating the number of seconds between forced updates;
464.B newplane,
465indicating (about) the number of updates between new plane entries;
466.B width,
467indicating the width of the play field; and
468.B height,
469indicating the height of the play field.
470.LP
471The second part of the field description files describes the locations
472of the exits, the beacons, the airports and the lines.
473The syntax is as follows:
474.IP
475beacon: (x y) ... ;
476.br
477airport: (x y direction) ... ;
478.br
479exit: (x y direction) ... ;
480.br
481line: [ (x1 y1) (x2 y2) ] ... ;
482.LP
483For beacons, a simple x, y coordinate pair is used (enclosed in parenthesis).
484Airports and exits require a third value, a direction, which is one
485of
486.B wedcxzaq.
487For airports, this is the direction that planes must be going to take
488off and land, and for exits, this is the direction that planes will going
489when they
490.B enter
491the arena. This may not seem intuitive, but as there is no restriction on
492direction of exit, this is appropriate.
493Lines are slightly different, since they need two coordinate pairs to
494specify the line endpoints. These endpoints must be enclosed in
495square brackets.
496.LP
497All statements are semi-colon (;) terminated. Multiple item statements
498accumulate. Each definition must occur exactly once, before any
499item statements. Comments begin with a hash (#) symbol
500and terminate with a newline.
501The coordinates are between zero and width-1 and height-1
502inclusive. All of the exit coordinates must lie on the borders, and
503all of the beacons and airports must lie inside of the borders.
504Line endpoints may be anywhere within the field, so long as
505the lines are horizontal, vertical or
506.B "exactly diagonal."
507.SS "FIELD FILE EXAMPLE"
508.RS
509.sp
510.nf
511.TA 1i 1i
512.ta 1i 1i
513# This is the default game.
514
515update = 5;
516newplane = 5;
517width = 30;
518height = 21;
519
520exit: ( 12 0 x ) ( 29 0 z ) ( 29 7 a ) ( 29 17 a )
521 ( 9 20 e ) ( 0 13 d ) ( 0 7 d ) ( 0 0 c ) ;
522
523beacon: ( 12 7 ) ( 12 17 ) ;
524
525airport: ( 20 15 w ) ( 20 18 d ) ;
526
527line: [ ( 1 1 ) ( 6 6 ) ]
528 [ ( 12 1 ) ( 12 6 ) ]
529 [ ( 13 7 ) ( 28 7 ) ]
530 [ ( 28 1 ) ( 13 16 ) ]
531 [ ( 1 13 ) ( 11 13 ) ]
532 [ ( 12 8 ) ( 12 16 ) ]
533 [ ( 11 18 ) ( 10 19 ) ]
534 [ ( 13 17 ) ( 28 17 ) ]
535 [ ( 1 7 ) ( 11 7 ) ] ;
536.fi
537.RE
538.SH FILES
539.LP
540Files are kept in a special directory. See the OPTIONS for a way to
541print this path out.
542.TP 16
543.B ATC_score
544Where the scores are kept.
545.TP 16
546.B Game_List
547The list of playable games.
548.SH AUTHOR
549.LP
550Ed James, UC Berkeley: edjames@ucbvax.berkeley.edu, ucbvax!edjames
44efdd62
KB
551.LP
552This game is based on someone's description of the overall flavor
553of a game written for some unknown PC many years ago, maybe.
efb4f774
KB
554.SH BUGS
555.LP
556The screen sometimes refreshes after you have quit.
557.LP
558Yet Another Curses Bug was discovered during the development of this game.
559If your curses library clrtobot.o is version 5.1 or earlier,
560you will have erase problems with the backspace operator in the input
561window.
44efdd62 562