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