atc.6.in 16 KB

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