1*66d1cd0cSwiz.\" $NetBSD: atc.6,v 1.24 2015/07/26 22:22:24 wiz Exp $ 2101657d1Scgd.\" 3101657d1Scgd.\" Copyright (c) 1990, 1993 4101657d1Scgd.\" The Regents of the University of California. All rights reserved. 561f28255Scgd.\" 661f28255Scgd.\" This code is derived from software contributed to Berkeley by 761f28255Scgd.\" Ed James. 861f28255Scgd.\" 961f28255Scgd.\" Redistribution and use in source and binary forms, with or without 1061f28255Scgd.\" modification, are permitted provided that the following conditions 1161f28255Scgd.\" are met: 1261f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 1361f28255Scgd.\" notice, this list of conditions and the following disclaimer. 1461f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1561f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1661f28255Scgd.\" documentation and/or other materials provided with the distribution. 17e5aeb4eaSagc.\" 3. Neither the name of the University nor the names of its contributors 1861f28255Scgd.\" may be used to endorse or promote products derived from this software 1961f28255Scgd.\" without specific prior written permission. 2061f28255Scgd.\" 2161f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2261f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2361f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2461f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2561f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2661f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2761f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2861f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2961f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3061f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3161f28255Scgd.\" SUCH DAMAGE. 3261f28255Scgd.\" 33101657d1Scgd.\" @(#)atc.6 8.1 (Berkeley) 5/31/93 3461f28255Scgd.\" 3561f28255Scgd.\" Copyright (c) 1986 Ed James. All rights reserved. 3661f28255Scgd.\" 37c5920dd5Swiz.Dd January 1, 2004 383365b567Ssommerfeld.Dt ATC 6 394abaa1bbSwiz.Os 403365b567Ssommerfeld.Sh NAME 413365b567Ssommerfeld.Nm atc 423365b567Ssommerfeld.Nd air traffic controller game 433365b567Ssommerfeld.Sh SYNOPSIS 443365b567Ssommerfeld.Nm atc 453365b567Ssommerfeld.Op Fl u?lstp 463365b567Ssommerfeld.Op Fl gf Ar "game name" 473365b567Ssommerfeld.Op Fl r Ar "random seed" 483365b567Ssommerfeld.Sh DESCRIPTION 4951ea0cbaSlukem.Nm 5061f28255Scgdlets you try your hand at the nerve wracking duties of the air traffic 51c91d8d6bSwizcontroller without endangering the lives of millions of travelers each year. 5261f28255ScgdYour responsibilities require you to direct the flight of jets 5361f28255Scgdand prop planes into and out of the flight arena and airports. 5461f28255ScgdThe speed (update time) and frequency of the planes depend on the 5561f28255Scgddifficulty of the chosen arena. 563365b567Ssommerfeld.Sh OPTIONS 573365b567Ssommerfeld.Bl -tag -width flag 583365b567Ssommerfeld.It Fl u 5961f28255ScgdPrint the usage line and exit. 60c91d8d6bSwiz.It Fl \&? 6161f28255ScgdSame as 623365b567Ssommerfeld.Fl u . 633365b567Ssommerfeld.It Fl l 6461f28255ScgdPrint a list of available games and exit. 6561f28255ScgdThe first game name printed is the default game. 663365b567Ssommerfeld.It Fl s 6761f28255ScgdPrint the score list (formerly the Top Ten list). 683365b567Ssommerfeld.It Fl t 6961f28255ScgdSame as 703365b567Ssommerfeld.Fl s . 713365b567Ssommerfeld.It Fl p 7261f28255ScgdPrint the path to the special directory where 7351ea0cbaSlukem.Nm 740d22e30cSwizexpects to find its private files. 750d22e30cSwizThis is used during the installation of the program. 763365b567Ssommerfeld.It Fl g Ar game 770d22e30cSwizPlay the named game. 780d22e30cSwizIf the game listed is not one of the ones printed from the 793365b567Ssommerfeld.Fl l 8061f28255Scgdoption, the default game is played. 813365b567Ssommerfeld.It Fl f Ar game 8261f28255ScgdSame as 833365b567Ssommerfeld.Fl g . 843365b567Ssommerfeld.It Fl r Ar seed 850d22e30cSwizSet the random seed. 860d22e30cSwizThe purpose of this flag is questionable. 873365b567Ssommerfeld.El 883365b567Ssommerfeld.Sh GOALS 8961f28255ScgdYour goal in 9051ea0cbaSlukem.Nm 9161f28255Scgdis to keep the game going as long as possible. 9261f28255ScgdThere is no winning state, except to beat the times of other players. 9361f28255ScgdYou will need to: launch planes at airports (by instructing them to 9461f28255Scgdincrease their altitude); land planes at airports (by instructing them to 9561f28255Scgdgo to altitude zero when exactly over the airport); and maneuver planes 9661f28255Scgdout of exit points. 973365b567Ssommerfeld.Pp 9861f28255ScgdSeveral things will cause the end of the game. 9961f28255ScgdEach plane has a destination (see information area), and 10061f28255Scgdsending a plane to the wrong destination is an error. 1010d22e30cSwizPlanes can run out of fuel, or can collide. 1020d22e30cSwizCollision is defined as adjacency in all three dimensions. 1030d22e30cSwizA plane leaving the arena 10461f28255Scgdin any other way than through its destination exit is an error as well. 1053365b567Ssommerfeld.Pp 1060d22e30cSwizScores are sorted in order of the number of planes safe. 1070d22e30cSwizThe other statistics are provided merely for fun. 1080d22e30cSwizThere is no penalty for 10961f28255Scgdtaking longer than another player (except in the case of ties). 1103365b567Ssommerfeld.Pp 1110d22e30cSwizSuspending a game is not permitted. 1120d22e30cSwizIf you get a talk message, tough. 113c91d8d6bSwizWhen was the last time an Air Traffic Controller got called away to the phone? 114904b6b94Swiz.Sh THE DISPLAY 11561f28255ScgdDepending on the terminal you run 11651ea0cbaSlukem.Nm 11761f28255Scgdon, the screen will be divided into 4 areas. 11861f28255ScgdIt should be stressed that the terminal driver portion of the 11961f28255Scgdgame was designed to be reconfigurable, so the display format can vary 1202418e1fbSwizdepending on the version you are playing. 1210d22e30cSwizThe descriptions here are based on the ascii version of the game. 1220d22e30cSwizThe game rules and input format, however, should remain consistent. 12361f28255ScgdControl-L redraws the screen, should it become muddled. 1243365b567Ssommerfeld.Ss RADAR 12561f28255ScgdThe first screen area is the radar display, showing the relative locations 12661f28255Scgdof the planes, airports, standard entry/exit points, radar 1273365b567Ssommerfeldbeacons, and ``lines'' which simply serve to aid you in guiding 12861f28255Scgdthe planes. 1293365b567Ssommerfeld.Pp 1300d22e30cSwizPlanes are shown as a single letter with an altitude. 1310d22e30cSwizIf the numerical altitude is a single digit, then it represents 13261f28255Scgdthousands of feet. 1330d22e30cSwizSome distinction is made between the prop planes and the jets. 1340d22e30cSwizOn ascii terminals, prop planes are 13561f28255Scgdrepresented by a upper case letter, jets by a lower case letter. 1363365b567Ssommerfeld.Pp 13761f28255ScgdAirports are shown as a number and some indication of the direction 13861f28255Scgdplanes must be going to land at the airport. 139dc5571b2SrossOn ascii terminals, this is one of `^', `\*[Gt]', `\*[Lt]', and `v', to indicate 14061f28255Scgdnorth (0 degrees), east (90), west (270) and south (180), respectively. 141c91d8d6bSwizThe planes will also take off in this direction. 1423365b567Ssommerfeld.Pp 14361f28255ScgdBeacons are represented as circles or asterisks and a number. 14461f28255ScgdTheir purpose is to offer a place of easy reference to the plane pilots. 145c91d8d6bSwizSee 146c91d8d6bSwiz.Sx THE DELAY COMMAND 147c91d8d6bSwizsection below. 1483365b567Ssommerfeld.Pp 14961f28255ScgdEntry/exit points are displayed as numbers along the border of the 1500d22e30cSwizradar screen. 1510d22e30cSwizPlanes will enter the arena from these points without warning. 1520d22e30cSwizThese points have a direction associated with them, and 1530d22e30cSwizplanes will always enter the arena from this direction. 1540d22e30cSwizOn the ascii version of 155990562bfSwiz.Nm , 1560d22e30cSwizthis direction is not displayed. 1570d22e30cSwizIt will become apparent what this direction is as the game progresses. 1583365b567Ssommerfeld.Pp 15961f28255ScgdIncoming planes will always enter at the same altitude: 7000 feet. 16061f28255ScgdFor a plane to successfully depart through an entry/exit point, 16161f28255Scgdit must be flying at 9000 feet. 16261f28255ScgdIt is not necessary for the planes to be flying in any particular 16361f28255Scgddirection when they leave the arena (yet). 164904b6b94Swiz.Ss INFORMATION AREA 16561f28255ScgdThe second area of the display is the information area, which lists 16661f28255Scgdthe time (number of updates since start), and the number of planes you 16761f28255Scgdhave directed safely out of the arena. 16861f28255ScgdBelow this is a list of planes currently in the air, followed by a 16961f28255Scgdblank line, and then a list of planes on the ground (at airports). 17061f28255ScgdEach line lists the plane name and its current altitude, 17161f28255Scgdan optional asterisk indicating low fuel, the plane's destination, 1720d22e30cSwizand the plane's current command. 1730d22e30cSwizChanging altitude is not considered 1740d22e30cSwizto be a command and is therefore not displayed. 1750d22e30cSwizThe following are some possible information lines: 1763365b567Ssommerfeld.Pp 177174b41a4Swiz.Bd -literal -offset indent 17861f28255ScgdB4*A0: Circle @ b1 17961f28255Scgdg7 E4: 225 1803365b567Ssommerfeld.Ed 1813365b567Ssommerfeld.Pp 1820d22e30cSwizThe first example shows a prop plane named `B' that is flying at 4000 feet. 1830d22e30cSwizIt is low on fuel (note the `*'). 1840d22e30cSwizIts destination is Airport #0. 1850d22e30cSwizThe next command it expects to do is circle when it reaches Beacon #1. 1863365b567SsommerfeldThe second example shows a jet named `g' at 7000 feet, destined for 1870d22e30cSwizExit #4. 1880d22e30cSwizIt is just now executing a turn to 225 degrees (South-West). 189904b6b94Swiz.Ss INPUT AREA 1900d22e30cSwizThe third area of the display is the input area. 1910d22e30cSwizIt is here that your input is reflected. 192c91d8d6bSwizSee the 193c91d8d6bSwiz.Sx INPUT 194c91d8d6bSwizheading of this manual for more details. 195904b6b94Swiz.Ss AUTHOR AREA 19661f28255ScgdThis area is used simply to give credit where credit is due. :-) 1973365b567Ssommerfeld.Sh INPUT 1980d22e30cSwizA command completion interface is built into the game. 1990d22e30cSwizAt any time, typing `?' will list possible input characters. 20061f28255ScgdTyping a backspace (your erase character) backs up, erasing the last part 2010d22e30cSwizof the command. 2020d22e30cSwizWhen a command is complete, a return enters it, and 2030d22e30cSwizany semantic checking is done at that time. 2040d22e30cSwizIf no errors are detected, the command is sent to the appropriate plane. 2050d22e30cSwizIf an error is discovered 20661f28255Scgdduring the check, the offending statement will be underscored and a 20761f28255Scgd(hopefully) descriptive message will be printed under it. 2083365b567Ssommerfeld.Pp 20961f28255ScgdThe command syntax is broken into two parts: 210c91d8d6bSwiz.Em Immediate Only 21161f28255Scgdand 2123365b567Ssommerfeld.Em Delayable 21361f28255Scgdcommands. 214c91d8d6bSwiz.Em Immediate Only 2150d22e30cSwizcommands happen on the next update. 2163365b567Ssommerfeld.Em Delayable 21761f28255Scgdcommands also happen on the next update unless they 21861f28255Scgdare followed by an optional predicate called the 2193365b567Ssommerfeld.Em Delay 22061f28255Scgdcommand. 2213365b567Ssommerfeld.Pp 22261f28255ScgdIn the following tables, the syntax 2233365b567Ssommerfeld.Em [0\-9] 22461f28255Scgdmeans any single digit, and 225c91d8d6bSwiz.Aq Em dir 2263365b567Ssommerfeldrefers to a direction, given by the keys around the `s' key: ``wedcxzaq''. 2273365b567SsommerfeldIn absolute references, `q' refers to North-West or 315 degrees, and `w' 22861f28255Scgdrefers to North, or 0 degrees. 229c91d8d6bSwizIn relative references, `q' refers to \-45 degrees or 45 degrees left, and `w' 23061f28255Scgdrefers to 0 degrees, or no change in direction. 2313365b567Ssommerfeld.Pp 2320d22e30cSwizAll commands start with a plane letter. 233c91d8d6bSwizThis indicates the recipient of the command. 2340d22e30cSwizCase is ignored. 235904b6b94Swiz.Ss IMMEDIATE ONLY COMMANDS 2363365b567Ssommerfeld.Bl -tag -width "aaaa" 2373365b567Ssommerfeld.It "a [ cd+- ]" Em number 2383365b567SsommerfeldAltitude: Change a plane's altitude, possibly requesting takeoff. 2393365b567Ssommerfeld`+' and `-' are the same as `c' and `d'. 2403365b567Ssommerfeld.Bl -tag -width "aaaaaaaaaa" -compact 2413365b567Ssommerfeld.It a Em number 2423365b567SsommerfeldClimb or descend to the given altitude (in thousands of feet). 2433365b567Ssommerfeld.It ac Em number 2443365b567SsommerfeldClimb: relative altitude change. 2453365b567Ssommerfeld.It ad Em number 2463365b567SsommerfeldDescend: relative altitude change. 2473365b567Ssommerfeld.El 2483365b567Ssommerfeld.It m 2490d22e30cSwizMark: Display in highlighted mode. 250c91d8d6bSwizPlane and command information is displayed normally. 2513365b567Ssommerfeld.It i 2520d22e30cSwizIgnore: Do not display highlighted. 253c91d8d6bSwizCommand is displayed as a line of dashes if there is no command. 2543365b567Ssommerfeld.It u 2553365b567SsommerfeldUnmark: Same as ignore, but if a delayed command is processed, 2560d22e30cSwizthe plane will become marked. 257c91d8d6bSwizThis is useful if you want to forget about a plane during part, 258c91d8d6bSwizbut not all, of its journey. 2593365b567Ssommerfeld.El 260904b6b94Swiz.Ss DELAYABLE COMMANDS 2613365b567Ssommerfeld.Bl -tag -width "aaaa" 2623365b567Ssommerfeld.It "c [ lr ]" 2633365b567SsommerfeldCircle: Have the plane circle. 2643365b567Ssommerfeld.Bl -tag -width "aaaaaaaaaa" -compact 2653365b567Ssommerfeld.It cl 2663365b567SsommerfeldLeft: Circle counterclockwise. 2673365b567Ssommerfeld.It cr 2683365b567SsommerfeldRight: Circle clockwise (default). 2693365b567Ssommerfeld.El 2703365b567Ssommerfeld.It "t [ l-r+LR ] [ dir ] or tt [ abe* ]" Em number 2713365b567SsommerfeldTurn: Change direction. 2723365b567Ssommerfeld.Bl -tag -width "aaaaaaaaaa" -compact 273dc5571b2Sross.It "t\*[Lt]dir\*[Gt]" 2743365b567SsommerfeldTurn to direction: Turn to the absolute compass heading given. 27561f28255ScgdThe shortest turn will be taken. 2763365b567Ssommerfeld.It "tl [ dir ]" 2773365b567SsommerfeldLeft: Turn counterclockwise: 45 degrees by default, or the amount 278c91d8d6bSwizspecified in 279c91d8d6bSwiz.Aq dir 280c91d8d6bSwiz(not 2813365b567Ssommerfeld.Em to 282c91d8d6bSwiz.Aq dir . ) 283c91d8d6bSwiz`w' (0 degrees) is no turn. 284c91d8d6bSwiz`e' is 45 degrees; `q' gives \-45 degrees counterclockwise, that is, 285c91d8d6bSwiz45 degrees clockwise. 2863365b567Ssommerfeld.It "t- [ dir ]" 2873365b567SsommerfeldSame as left. 2883365b567Ssommerfeld.It "tr [ dir ]" 289c91d8d6bSwizRight: Turn clockwise, 45 degrees by default, or the amount specified in 290c91d8d6bSwiz.Aq dir . 2913365b567Ssommerfeld.It "t+ [ dir ]" 2923365b567SsommerfeldSame as right. 2933365b567Ssommerfeld.It tL 2943365b567SsommerfeldHard left: Turn counterclockwise 90 degrees. 2953365b567Ssommerfeld.It tR 2963365b567SsommerfeldHard right: Turn clockwise 90 degrees. 2973365b567Ssommerfeld.It "tt [abe*]" 2980d22e30cSwizTowards: Turn towards a beacon, airport or exit. 2990d22e30cSwizThe turn is just an estimate. 3003365b567Ssommerfeld.It "tta" Em number 3013365b567SsommerfeldTurn towards the given airport. 3023365b567Ssommerfeld.It "ttb" Em number 3033365b567SsommerfeldTurn towards the specified beacon. 3043365b567Ssommerfeld.It "tte" Em number 3053365b567SsommerfeldTurn towards an exit. 3063365b567Ssommerfeld.It "tt*" Em number 3073365b567SsommerfeldSame as ttb. 3083365b567Ssommerfeld.El 3093365b567Ssommerfeld.El 3103365b567Ssommerfeld.Ss THE DELAY COMMAND 31161f28255ScgdThe 3123365b567Ssommerfeld.Em Delay 313c91d8d6bSwiz(a/@) command may be appended to any 3143365b567Ssommerfeld.Em Delayable 3150d22e30cSwizcommand. 316c91d8d6bSwizIt allows the controller to instruct a plane to do an action when the 317c91d8d6bSwizplane reaches a particular beacon (or other objects in future versions). 3183365b567Ssommerfeld.Bl -tag -width "aaaa" 3193365b567Ssommerfeld.It ab Em number 320c91d8d6bSwizDo the delayable command when the plane reaches the specified beacon. 3210d22e30cSwizThe `b' for ``beacon'' is redundant to allow for expansion. 3223365b567Ssommerfeld`@' can be used instead of `a'. 3233365b567Ssommerfeld.El 324904b6b94Swiz.Ss MARKING, UNMARKING AND IGNORING 32561f28255ScgdPlanes are 3263365b567Ssommerfeld.Em marked 3270d22e30cSwizby default when they enter the arena. 3280d22e30cSwizThis means they are displayed in highlighted mode on the radar display. 3290d22e30cSwizA plane may also be either 3303365b567Ssommerfeld.Em unmarked 33161f28255Scgdor 3323365b567Ssommerfeld.Em ignored . 33361f28255ScgdAn 334650c1aeaSjhawk.Em ignored 33561f28255Scgdplane is drawn in unhighlighted mode, and a line of dashes is displayed in 3360d22e30cSwizthe command field of the information area. 3370d22e30cSwizThe plane will remain this way until a mark command has been issued. 3380d22e30cSwizAny other command will be issued, but the command line will return to a 3390d22e30cSwizline of dashes when the command is completed. 3403365b567Ssommerfeld.Pp 34161f28255ScgdAn 342650c1aeaSjhawk.Em unmarked 343650c1aeaSjhawkplane is treated the same as an 3443365b567Ssommerfeld.Em ignored 345650c1aeaSjhawkplane, except that it will automatically switch to 3463365b567Ssommerfeld.Em marked 3470d22e30cSwizstatus when a delayed command has been processed. 3480d22e30cSwizThis is useful if you want to forget about a plane for a while, but its 3490d22e30cSwizflight path has not yet been completely set. 3503365b567Ssommerfeld.Pp 35161f28255ScgdAs with all of the commands, marking, unmarking and ignoring will take effect 3520d22e30cSwizat the beginning of the next update. 3530d22e30cSwizDo not be surprised if the plane does 35461f28255Scgdnot immediately switch to unhighlighted mode. 3553365b567Ssommerfeld.Ss EXAMPLES 3563365b567Ssommerfeld.Bl -tag -width gtte4ab2 -offset indent 3573365b567Ssommerfeld.It atlab1 3583365b567SsommerfeldPlane A: turn left at beacon #1 3593365b567Ssommerfeld.It cc 3603365b567SsommerfeldPlane C: circle 3613365b567Ssommerfeld.It gtte4ab2 3623365b567SsommerfeldPlane G: turn towards exit #4 at beacon #2 3633365b567Ssommerfeld.It ma+2 3643365b567SsommerfeldPlane M: altitude: climb 2000 feet 3653365b567Ssommerfeld.It stq 3663365b567SsommerfeldPlane S: turn to 315 3673365b567Ssommerfeld.It xi 3683365b567SsommerfeldPlane X: ignore 369fbaff02bShubertf.El 370904b6b94Swiz.Sh OTHER INFORMATION 3713365b567Ssommerfeld.Bl -bullet 3723365b567Ssommerfeld.It 37361f28255ScgdJets move every update; prop planes move every other update. 3743365b567Ssommerfeld.It 3752418e1fbSwizAll planes turn at most 90 degrees per movement. 3763365b567Ssommerfeld.It 37761f28255ScgdPlanes enter at 7000 feet and leave at 9000 feet. 3783365b567Ssommerfeld.It 37961f28255ScgdPlanes flying at an altitude of 0 crash if they are not over an airport. 3803365b567Ssommerfeld.It 38161f28255ScgdPlanes waiting at airports can only be told to take off (climb in altitude). 382618c8fadSjsm.It 383618c8fadSjsmPressing return (that is, entering an empty command) will perform the 384618c8fadSjsmnext update immediately. 385618c8fadSjsmThis allows you to ``fast forward'' 386618c8fadSjsmthe game clock if nothing interesting is happening. 387fbaff02bShubertf.El 388904b6b94Swiz.Sh NEW GAMES 38961f28255ScgdThe 3903365b567Ssommerfeld.Pa Game_List 3910d22e30cSwizfile lists the currently available play fields. 3920d22e30cSwizNew field description file names must be placed in this file to be playable. 3930d22e30cSwizIf a player specifies a game not in this file, his score will not be logged. 3943365b567Ssommerfeld.Pp 3950d22e30cSwizThe game field description files are broken into two parts. 396c91d8d6bSwizThe first part is the definition section. 3970d22e30cSwizHere, the four tunable game parameters must be set. 3980d22e30cSwizThese variables are set with the syntax: 3993365b567Ssommerfeld.Pp 4003365b567Ssommerfeld.Dl "variable = number;" 4013365b567Ssommerfeld.Pp 40261f28255ScgdVariable may be one of: 4033365b567Ssommerfeld.Li update , 40461f28255Scgdindicating the number of seconds between forced updates; 4053365b567Ssommerfeld.Li newplane , 40661f28255Scgdindicating (about) the number of updates between new plane entries; 4073365b567Ssommerfeld.Li width , 4083365b567Ssommerfeldindicating the width of the play field; or 4093365b567Ssommerfeld.Li height , 41061f28255Scgdindicating the height of the play field. 4113365b567Ssommerfeld.Pp 41261f28255ScgdThe second part of the field description files describes the locations 41361f28255Scgdof the exits, the beacons, the airports and the lines. 41461f28255ScgdThe syntax is as follows: 4153365b567Ssommerfeld.Pp 4163365b567Ssommerfeld.Bd -literal -offset indent 4173365b567Ssommerfeld.Bl -tag -width airport: -compact 4183365b567Ssommerfeld.It beacon : 4193365b567Ssommerfeld(x y) ... ; 4203365b567Ssommerfeld.It airport : 4213365b567Ssommerfeld(x y direction) ... ; 4223365b567Ssommerfeld.It exit : 4233365b567Ssommerfeld(x y direction) ... ; 4243365b567Ssommerfeld.It line : 4253365b567Ssommerfeld[ (x1 y1) (x2 y2) ] ... ; 4263365b567Ssommerfeld.El 4273365b567Ssommerfeld.Ed 4283365b567Ssommerfeld.Pp 429c91d8d6bSwizFor beacons, a simple x, y coordinate pair is used (enclosed in parenthesis). 4300d22e30cSwizAirports and exits require a third value, which is one of the directions 4313365b567Ssommerfeld.Em wedcxzaq . 43261f28255ScgdFor airports, this is the direction that planes must be going to take 4332418e1fbSwizoff and land, and for exits, this is the direction that planes will be 4342418e1fbSwizgoing when they 4353365b567Ssommerfeld.Em enter 4360d22e30cSwizthe arena. 4370d22e30cSwizThis may not seem intuitive, but as there is no restriction on 43861f28255Scgddirection of exit, this is appropriate. 43961f28255ScgdLines are slightly different, since they need two coordinate pairs to 4400d22e30cSwizspecify the line endpoints. 4410d22e30cSwizThese endpoints must be enclosed in square brackets. 4423365b567Ssommerfeld.Pp 4430d22e30cSwizAll statements are semi-colon (;) terminated. 4440d22e30cSwizMultiple item statements accumulate. 4450d22e30cSwizEach definition must occur exactly once, before any item statements. 4460d22e30cSwizComments begin with a hash (#) symbol and terminate with a newline. 4470d22e30cSwizThe coordinates are between zero and width-1 and height-1 inclusive. 4480d22e30cSwizAll of the exit coordinates must lie on the borders, and 44961f28255Scgdall of the beacons and airports must lie inside of the borders. 45061f28255ScgdLine endpoints may be anywhere within the field, so long as 45161f28255Scgdthe lines are horizontal, vertical or 4523365b567Ssommerfeld.Em exactly 4533365b567Ssommerfelddiagonal. 454904b6b94Swiz.Ss FIELD FILE EXAMPLE 455174b41a4Swiz.Bd -literal 45661f28255Scgd# This is the default game. 45761f28255Scgd 45861f28255Scgdupdate = 5; 459f54820aeSpgoyettenewplane = 10; 46061f28255Scgdwidth = 30; 46161f28255Scgdheight = 21; 46261f28255Scgd 46361f28255Scgdexit: ( 12 0 x ) ( 29 0 z ) ( 29 7 a ) ( 29 17 a ) 46461f28255Scgd ( 9 20 e ) ( 0 13 d ) ( 0 7 d ) ( 0 0 c ) ; 46561f28255Scgd 46661f28255Scgdbeacon: ( 12 7 ) ( 12 17 ) ; 46761f28255Scgd 46861f28255Scgdairport: ( 20 15 w ) ( 20 18 d ) ; 46961f28255Scgd 47061f28255Scgdline: [ ( 1 1 ) ( 6 6 ) ] 47161f28255Scgd [ ( 12 1 ) ( 12 6 ) ] 47261f28255Scgd [ ( 13 7 ) ( 28 7 ) ] 47361f28255Scgd [ ( 28 1 ) ( 13 16 ) ] 47461f28255Scgd [ ( 1 13 ) ( 11 13 ) ] 47561f28255Scgd [ ( 12 8 ) ( 12 16 ) ] 47661f28255Scgd [ ( 11 18 ) ( 10 19 ) ] 47761f28255Scgd [ ( 13 17 ) ( 28 17 ) ] 47861f28255Scgd [ ( 1 7 ) ( 11 7 ) ] ; 4793365b567Ssommerfeld 4803365b567Ssommerfeld.Ed 4813365b567Ssommerfeld.Sh FILES 4820d22e30cSwizFiles are kept in a special directory. 483c91d8d6bSwizSee the 484c91d8d6bSwiz.Sx OPTIONS 485c91d8d6bSwizsection for a way to print this path out. 4860d22e30cSwizIt is normally 4873365b567Ssommerfeld.Pa /usr/share/games/atc . 4883365b567Ssommerfeld.Pp 4893365b567SsommerfeldThis directory contains the file 4903365b567Ssommerfeld.Pa Game_List , 4910d22e30cSwizwhich holds the list of playable games, as well as the games themselves. 4923365b567Ssommerfeld.Pp 4933365b567SsommerfeldThe scores are kept in 4943365b567Ssommerfeld.Pa /var/games/atc_score . 495d9f5a9dfSwiz.Sh AUTHORS 496*66d1cd0cSwiz.An Ed James , 497*66d1cd0cSwizUC Berkeley: 498*66d1cd0cSwiz.Aq Mt edjames@ucbvax.berkeley.edu , 499*66d1cd0cSwizucbvax!edjames 5003365b567Ssommerfeld.Pp 50161f28255ScgdThis game is based on someone's description of the overall flavor 50261f28255Scgdof a game written for some unknown PC many years ago, maybe. 5033365b567Ssommerfeld.Sh BUGS 50461f28255ScgdThe screen sometimes refreshes after you have quit. 505