BSD 4_4 development
[unix-history] / usr / share / man / cat6 / atc.0
CommitLineData
a4bc5b60
C
1
2
3
4ATC(6) BSD Reference Manual ATC(6)
5
6
7N\bNA\bAM\bME\bE
8 atc - air traffic controller game
9
10S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
11 a\bat\btc\bc -[u?lstp] [-[gf] game_name] [-r random seed]
12
13D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
14 _\bA_\bt_\bc lets you try your hand at the nerve wracking duties of
15 the air traffic controller without endangering the lives
16 of millions of travelers each year. Your responsibilities
17 require you to direct the flight of jets and prop planes
18 into and out of the flight arena and airports. The speed
19 (update time) and frequency of the planes depend on the
20 difficulty of the chosen arena.
21
22O\bOP\bPT\bTI\bIO\bON\bNS\bS
23 -\b-u\bu Print the usage line and exit.
24
25 -\b-?\b? Same as -\b-u\bu.\b.
26
27 -\b-l\bl Print a list of available games and exit. The
28 first game name printed is the default game.
29
30 -\b-s\bs Print the score list (formerly the Top Ten list).
31
32 -\b-t\bt Same as -\b-s\bs.\b.
33
34 -\b-p\bp Print the path to the special directory where _\ba_\bt_\bc
35 expects to find its private files. This is used
36 during the installation of the program.
37
38 -\b-g\bg g\bga\bam\bme\be Play the named game. If the game listed is not
39 one of the ones printed from the -\b-l\bl option, the
40 default game is played.
41
42 -\b-f\bf g\bga\bam\bme\be Same as -\b-g\bg.\b.
43
44 -\b-r\br s\bse\bee\bed\bd Set the random seed. The purpose of this flag is
45 questionable.
46
47G\bGO\bOA\bAL\bLS\bS
48 Your goal in _\ba_\bt_\bc is to keep the game going as long as pos-
49 sible. There is no winning state, except to beat the
50 times of other players. You will need to: launch planes
51 at airports (by instructing them to increase their alti-
52 tude); land planes at airports (by instructing them to go
53 to altitude zero when exactly over the airport); and
54 maneuver planes out of exit points.
55
56 Several things will cause the end of the game. Each plane
57 has a destination (see information area), and sending a
58
59
60
613rd Berkeley Distribution May 31, 1993 1
62
63
64
65
66
67
68
69
70ATC(6) BSD Reference Manual ATC(6)
71
72
73 plane to the wrong destination is an error. Planes can
74 run out of fuel, or can collide. Collision is defined as
75 adjacency in any of the three dimensions. A plane leaving
76 the arena in any other way than through its destination
77 exit is an error as well.
78
79 Scores are sorted in order of the number of planes safe.
80 The other statistics are provided merely for fun. There
81 is no penalty for taking longer than another player
82 (except in the case of ties).
83
84 Suspending a game is not permitted. If you get a talk
85 message, tough. When was the last time an Air Traffic
86 Controller got called away to the phone?
87
88T\bTH\bHE\bE D\bDI\bIS\bSP\bPL\bLA\bAY\bY
89 Depending on the terminal you run _\ba_\bt_\bc on, the screen will
90 be divided into 4 areas. It should be stressed that the
91 terminal driver portion of the game was designed to be
92 reconfigurable, so the display format can vary depending
93 the version you are playing. The descriptions here are
94 based on the ascii version of the game. The game rules
95 and input format, however, should remain consistent. Con-
96 trol-L redraws the screen, should it become muddled.
97
98 R\bRA\bAD\bDA\bAR\bR
99 The first screen area is the radar display, showing
100 the relative locations of the planes, airports,
101 standard entry/exit points, radar beacons, and
102 "lines" which simply serve to aid you in guiding
103 the planes.
104
105 Planes are shown as a single letter with an alti-
106 tude. If the numerical altitude is a single digit,
107 then it represents thousands of feet. Some dis-
108 tinction is made between the prop planes and the
109 jets. On ascii terminals, prop planes are repre-
110 sented by a upper case letter, jets by a lower case
111 letter.
112
113 Airports are shown as a number and some indication
114 of the direction planes must be going to land at
115 the airport. On ascii terminals, this is one of
116 '^', '>', '<', and 'v', to indicate north (0
117 degrees), east (90), west (270) and south (180),
118 respectively. The planes will also take off in
119 this direction.
120
121 Beacons are represented as circles or asterisks and
122 a number. Their purpose is to offer a place of
123 easy reference to the plane pilots. See 'the delay
124
125
126
1273rd Berkeley Distribution May 31, 1993 2
128
129
130
131
132
133
134
135
136ATC(6) BSD Reference Manual ATC(6)
137
138
139 command' under the input section of this manual.
140
141 Entry/exit points are displayed as numbers along
142 the border of the radar screen. Planes will enter
143 the arena from these points without warning. These
144 points have a direction associated with them, and
145 planes will always enter the arena from this direc-
146 tion. On the ascii version of _\ba_\bt_\bc_\b, this direction
147 is not displayed. It will become apparent what
148 this direction is as the game progresses.
149
150 Incoming planes will always enter at the same alti-
151 tude: 7000 feet. For a plane to successfully
152 depart through an entry/exit point, it must be fly-
153 ing at 9000 feet. It is not necessary for the
154 planes to be flying in any particular direction
155 when they leave the arena (yet).
156
157 I\bIN\bNF\bFO\bOR\bRM\bMA\bAT\bTI\bIO\bON\bN A\bAR\bRE\bEA\bA
158 The second area of the display is the information
159 area, which lists the time (number of updates since
160 start), and the number of planes you have directed
161 safely out of the arena. Below this is a list of
162 planes currently in the air, followed by a blank
163 line, and then a list of planes on the ground (at
164 airports). Each line lists the plane name and its
165 current altitude, an optional asterisk indicating
166 low fuel, the plane's destination, and the plane's
167 current command. Changing altitude is not consid-
168 ered to be a command and is therefore not dis-
169 played. The following are some possible informa-
170 tion lines:
171
172 B4*A0: Circle @ b1
173 g7 E4: 225
174
175 The first example shows a prop plane named 'B' that
176 is flying at 4000 feet. It is low on fuel (note
177 the '*'). It's destination is Airport #0. The
178 next command it expects to do is circle when it
179 reaches Beacon #1. The second example shows a jet
180 named 'g' at 7000 feet, destined for Exit #4. It
181 is just now executing a turn to 225 degrees (South-
182 West).
183
184 I\bIN\bNP\bPU\bUT\bT A\bAR\bRE\bEA\bA
185 The third area of the display is the input area.
186 It is here that your input is reflected. See the
187 INPUT heading of this manual for more details.
188
189
190
191
192
1933rd Berkeley Distribution May 31, 1993 3
194
195
196
197
198
199
200
201
202ATC(6) BSD Reference Manual ATC(6)
203
204
205 A\bAU\bUT\bTH\bHO\bOR\bR A\bAR\bRE\bEA\bA
206 This area is used simply to give credit where
207 credit is due. :-)
208
209I\bIN\bNP\bPU\bUT\bT
210 A command completion interface is built into the game. At
211 any time, typing '?' will list possible input characters.
212 Typing a backspace (your erase character) backs up, eras-
213 ing the last part of the command. When a command is com-
214 plete, a return enters it, and any semantic checking is
215 done at that time. If no errors are detected, the command
216 is sent to the appropriate plane. If an error is discov-
217 ered during the check, the offending statement will be
218 underscored and a (hopefully) descriptive message will be
219 printed under it.
220
221 The command syntax is broken into two parts: _\bI_\bm_\bm_\be_\bd_\bi_\ba_\bt_\be
222 _\bO_\bn_\bl_\by and _\bD_\be_\bl_\ba_\by_\ba_\bb_\bl_\be commands. _\bI_\bm_\bm_\be_\bd_\bi_\ba_\bt_\be _\bO_\bn_\bl_\by commands hap-
223 pen on the next update. _\bD_\be_\bl_\ba_\by_\ba_\bb_\bl_\be commands also happen on
224 the next update unless they are followed by an optional
225 predicate called the _\bD_\be_\bl_\ba_\by command.
226
227 In the following tables, the syntax [\b[0\b0-\b-9\b9]\b] means any single
228 digit, and <\b<d\bdi\bir\br>\b> refers to the keys around the 's' key,
229 namely ``wedcxzaq''. In absolute references, 'q' refers
230 to North-West or 315 degrees, and 'w' refers to North, or
231 0 degrees. In relative references, 'q' refers to -45
232 degrees or 45 degrees left, and 'w' refers to 0 degrees,
233 or no change in direction.
234
235 All commands start with a plane letter. This indicates
236 the recipient of the command. Case is ignored.
237
238 I\bIM\bMM\bME\bED\bDI\bIA\bAT\bTE\bE O\bON\bNL\bLY\bY C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
239 -\b- a\ba A\bAl\blt\bti\bit\btu\bud\bde\be:\b:
240 Affect a plane's altitude (and take off).
241 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
242 Go to the given altitude (thousands
243 of feet).
244 -\b- c\bc/\b/+\b+ C\bCl\bli\bim\bmb\bb:\b:
245 Relative altitude change.
246 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
247 Difference in thousands of
248 feet.
249 -\b- d\bd/\b/-\b- D\bDe\bes\bsc\bce\ben\bnd\bd:\b:
250 Relative altitude change.
251 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
252 Difference in thousands of
253 feet.
254 -\b- m\bm M\bMa\bar\brk\bk:\b:
255 Display in highlighted mode. Command is
256
257
258
2593rd Berkeley Distribution May 31, 1993 4
260
261
262
263
264
265
266
267
268ATC(6) BSD Reference Manual ATC(6)
269
270
271 displayed normally.
272 -\b- i\bi I\bIg\bgn\bno\bor\bre\be:\b:
273 Do not display highlighted. Command is dis-
274 played as a line of dashes if there is no
275 command.
276 -\b- u\bu U\bUn\bnm\bma\bar\brk\bk:\b:
277 Same as ignore, but if a delayed command is
278 processed, the plane will become marked.
279 This is useful if you want to forget about a
280 plane during part, but not all, of its jour-
281 ney.
282
283 D\bDE\bEL\bLA\bAY\bYA\bAB\bBL\bLE\bE C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
284 -\b- c\bc C\bCi\bir\brc\bcl\ble\be:\b:
285 Have the plane circle (clockwise by
286 default).
287 -\b- l\bl L\bLe\bef\bft\bt:\b:
288 Circle counterclockwise.
289 -\b- r\br R\bRi\big\bgh\bht\bt:\b:
290 Circle clockwise.
291 -\b- t\bt T\bTu\bur\brn\bn:\b:
292 Change direction.
293 -\b- l\bl L\bLe\bef\bft\bt:\b:
294 Turn counterclockwise (45 degrees by
295 default).
296 -\b- <\b<d\bdi\bir\br>\b> D\bDi\bir\bre\bec\bct\bti\bio\bon\bn:\b:
297 Turn ccw the given number of
298 degrees. Zero degrees is no
299 turn. A ccw turn of -45
300 degrees is 45 cw.
301 -\b- r\br R\bRi\big\bgh\bht\bt:\b:
302 Turn clockwise (45 degrees by
303 default).
304 -\b- <\b<d\bdi\bir\br>\b> D\bDi\bir\bre\bec\bct\bti\bio\bon\bn:\b:
305 Same as turn left <dir>.
306 -\b- L\bL L\bLe\bef\bft\bt 9\b90\b0:\b:
307 Turn counterclockwise 90 degrees.
308 -\b- R\bR R\bRi\big\bgh\bht\bt 9\b90\b0:\b:
309 Turn clockwise 90 degrees.
310 -\b- <\b<d\bdi\bir\br>\b> D\bDi\bir\bre\bec\bct\bti\bio\bon\bn:\b:
311 Turn to the absolute compass heading
312 given. The shortest turn will be
313 taken.
314 -\b- t\bt T\bTo\bow\bwa\bar\brd\bds\bs:\b:
315 Turn towards a beacon, airport or
316 exit. The turn is just an estimate.
317 -\b- b\bb/\b/*\b* B\bBe\bea\bac\bco\bon\bn:\b:
318 Turn towards the beacon.
319 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
320 The beacon number.
321 -\b- e\be E\bEx\bxi\bit\bt:\b:
322
323
324
3253rd Berkeley Distribution May 31, 1993 5
326
327
328
329
330
331
332
333
334ATC(6) BSD Reference Manual ATC(6)
335
336
337 Turn towards the exit.
338 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
339 The exit number.
340 -\b- a\ba A\bAi\bir\brp\bpo\bor\brt\bt:\b:
341 Turn towards the airport.
342 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
343 The airport number.
344
345 T\bTH\bHE\bE D\bDE\bEL\bLA\bAY\bY C\bCO\bOM\bMM\bMA\bAN\bND\bD
346 The D\bDe\bel\bla\bay\by (a/@) command may be appended to any D\bDe\bel\bla\bay\bya\bab\bbl\ble\be
347 command. It allows the controller to instruct a plane to
348 do an action when the plane reaches a particular beacon
349 (or other objects in future versions).
350
351 -\b- a\ba/\b/@\b@ A\bAt\bt:\b:
352 Do the given delayable command when the
353 plane reaches the given beacon.
354 -\b- b\bb/\b/*\b* B\bBe\bea\bac\bco\bon\bn:\b:
355 This is redundant to allow for
356 expansion.
357 -\b- [\b[0\b0-\b-9\b9]\b] N\bNu\bum\bmb\bbe\ber\br:\b:
358 The beacon number.
359
360 M\bMA\bAR\bRK\bKI\bIN\bNG\bG,\b, U\bUN\bNM\bMA\bAR\bRK\bKI\bIN\bNG\bG A\bAN\bND\bD I\bIG\bGN\bNO\bOR\bRI\bIN\bNG\bG
361 Planes are m\bma\bar\brk\bke\bed\bd when they enter the arena. This means
362 they are displayed in highlighted mode on the radar dis-
363 play. A plane may also be either u\bun\bnm\bma\bar\brk\bke\bed\bd or i\big\bgn\bno\bor\bre\bed\bd.\b. An
364 u\bun\bnm\bma\bar\brk\bke\bed\bd plane is drawn in unhighlighted mode, and a line
365 of dashes is displayed in the command field of the infor-
366 mation area. The plane will remain this way until a mark
367 command has been issued. Any other command will be
368 issued, but the command line will return to a line of
369 dashes when the command is completed.
370
371 An i\big\bgn\bno\bor\bre\bed\bd plane is treated the same as an unmarked plane,
372 except that it will automatically switch to m\bma\bar\brk\bke\bed\bd status
373 when a delayed command has been processed. This is useful
374 if you want to forget about a plane for a while, but its
375 flight path has not yet been completely set.
376
377 As with all of the commands, marking, unmarking and ignor-
378 ing will take effect at the beginning of the next update.
379 Do not be surprised if the plane does not immediately
380 switch to unhighlighted mode.
381
382 E\bEX\bXA\bAM\bMP\bPL\bLE\bES\bS
383 atlab1 a: turn left at beacon #1
384
385 cc C: circle
386
387 gtte4ab2 g: turn towards exit #4 at beacon
388
389
390
3913rd Berkeley Distribution May 31, 1993 6
392
393
394
395
396
397
398
399
400ATC(6) BSD Reference Manual ATC(6)
401
402
403 #2
404
405 ma+2 m: altitude: climb 2000 feet
406
407 stq S: turn to 315
408
409 xi x: ignore
410
411O\bOT\bTH\bHE\bER\bR I\bIN\bNF\bFO\bOR\bRM\bMA\bAT\bTI\bIO\bON\bN
412 Jets move every update; prop planes move every other
413 update.
414
415 All planes turn a most 90 degrees per movement.
416
417 Planes enter at 7000 feet and leave at 9000 feet.
418
419 Planes flying at an altitude of 0 crash if they are not
420 over an airport.
421
422 Planes waiting at airports can only be told to take off
423 (climb in altitude).
424
425N\bNE\bEW\bW G\bGA\bAM\bME\bES\bS
426 The G\bGa\bam\bme\be_\b_L\bLi\bis\bst\bt file lists the currently available play
427 fields. New field description file names must be placed
428 in this file to be 'playable'. If a player specifies a
429 game not in this file, his score will not be logged.
430
431 The game field description files are broken into two
432 parts. The first part is the definition section. Here,
433 the four tunable game parameters must be set. These vari-
434 ables are set with the syntax:
435
436 variable = number;
437
438 Variable may be one of: u\bup\bpd\bda\bat\bte\be,\b, indicating the number of
439 seconds between forced updates; n\bne\bew\bwp\bpl\bla\ban\bne\be,\b, indicating
440 (about) the number of updates between new plane entries;
441 w\bwi\bid\bdt\bth\bh,\b, indicating the width of the play field; and h\bhe\bei\big\bgh\bht\bt,\b,
442 indicating the height of the play field.
443
444 The second part of the field description files describes
445 the locations of the exits, the beacons, the airports and
446 the lines. The syntax is as follows:
447
448 beacon: (x y) ... ;
449 airport: (x y direction) ... ;
450 exit: (x y direction) ... ;
451 line: [ (x1 y1) (x2 y2) ] ... ;
452
453 For beacons, a simple x, y coordinate pair is used
454
455
456
4573rd Berkeley Distribution May 31, 1993 7
458
459
460
461
462
463
464
465
466ATC(6) BSD Reference Manual ATC(6)
467
468
469 (enclosed in parenthesis). Airports and exits require a
470 third value, a direction, which is one of w\bwe\bed\bdc\bcx\bxz\bza\baq\bq.\b. For
471 airports, this is the direction that planes must be going
472 to take off and land, and for exits, this is the direction
473 that planes will going when they e\ben\bnt\bte\ber\br the arena. This
474 may not seem intuitive, but as there is no restriction on
475 direction of exit, this is appropriate. Lines are
476 slightly different, since they need two coordinate pairs
477 to specify the line endpoints. These endpoints must be
478 enclosed in square brackets.
479
480 All statements are semi-colon (;) terminated. Multiple
481 item statements accumulate. Each definition must occur
482 exactly once, before any item statements. Comments begin
483 with a hash (#) symbol and terminate with a newline. The
484 coordinates are between zero and width-1 and height-1
485 inclusive. All of the exit coordinates must lie on the
486 borders, and all of the beacons and airports must lie
487 inside of the borders. Line endpoints may be anywhere
488 within the field, so long as the lines are horizontal,
489 vertical or e\bex\bxa\bac\bct\btl\bly\by d\bdi\bia\bag\bgo\bon\bna\bal\bl.\b.
490
491 F\bFI\bIE\bEL\bLD\bD F\bFI\bIL\bLE\bE E\bEX\bXA\bAM\bMP\bPL\bLE\bE
492 # This is the default game.
493
494 update = 5;
495 newplane = 5;
496 width = 30;
497 height = 21;
498
499 exit: ( 12 0 x ) ( 29 0 z ) ( 29 7 a ) ( 29 17 a )
500 ( 9 20 e ) ( 0 13 d ) ( 0 7 d ) ( 0 0 c ) ;
501
502 beacon: ( 12 7 ) ( 12 17 ) ;
503
504 airport: ( 20 15 w ) ( 20 18 d ) ;
505
506 line: [ ( 1 1 ) ( 6 6 ) ]
507 [ ( 12 1 ) ( 12 6 ) ]
508 [ ( 13 7 ) ( 28 7 ) ]
509 [ ( 28 1 ) ( 13 16 ) ]
510 [ ( 1 13 ) ( 11 13 ) ]
511 [ ( 12 8 ) ( 12 16 ) ]
512 [ ( 11 18 ) ( 10 19 ) ]
513 [ ( 13 17 ) ( 28 17 ) ]
514 [ ( 1 7 ) ( 11 7 ) ] ;
515
516F\bFI\bIL\bLE\bES\bS
517 Files are kept in a special directory. See the OPTIONS for
518 a way to print this path out.
519
520
521
522
5233rd Berkeley Distribution May 31, 1993 8
524
525
526
527
528
529
530
531
532ATC(6) BSD Reference Manual ATC(6)
533
534
535 A\bAT\bTC\bC_\b_s\bsc\bco\bor\bre\be Where the scores are kept.
536
537 G\bGa\bam\bme\be_\b_L\bLi\bis\bst\bt The list of playable games.
538
539A\bAU\bUT\bTH\bHO\bOR\bR
540 Ed James, UC Berkeley: edjames@ucbvax.berkeley.edu, ucb-
541 vax!edjames
542
543 This game is based on someone's description of the overall
544 flavor of a game written for some unknown PC many years
545 ago, maybe.
546
547B\bBU\bUG\bGS\bS
548 The screen sometimes refreshes after you have quit.
549
550 Yet Another Curses Bug was discovered during the develop-
551 ment of this game. If your curses library clrtobot.o is
552 version 5.1 or earlier, you will have erase problems with
553 the backspace operator in the input window.
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
5893rd Berkeley Distribution May 31, 1993 9
590
591
592
593
594