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