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