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