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