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