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