home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v14i074: xbattle - multi-player battle strategy game for X-Windows, Part03/07
- Message-ID: <3513@master.CNA.TEK.COM>
- Date: 7 Sep 92 21:22:59 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 875
- Approved: billr@saab.CNA.TEK.COM
-
- Submitted-by: slehar@cns.bu.edu
- Posting-number: Volume 14, Issue 74
- Archive-name: xbattle/Part03
- Environment: Xlib
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 3 (of 7)."
- # Contents: xbattle.man
- # Wrapped by billr@saab on Mon Sep 7 14:18:50 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'xbattle.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xbattle.man'\"
- else
- echo shar: Extracting \"'xbattle.man'\" \(47864 characters\)
- sed "s/^X//" >'xbattle.man' <<'END_OF_FILE'
- X.TH XBATTLE 4.0 "Aug 1992"
- X.SH NAME
- Xxbattle \- a multi-user battle strategy game
- X.SH SYNOPSIS
- X xbattle [-<color> <display>...] [-<option> <argument>...]
- X.SH
- X
- XAssign a team color and display to each player, and any number of
- Xoptions with argument where required. <color> can be a monochrome
- Xtone, -black -white -dark -light, or a color, -red -green -blue -cyan
- X-magenta -yellow; <display> is the name of the x display for each
- Xplayer. Command line arguments can be supplied in any order. For a
- Xquick introduction, go straight to the EXAMPLES section below. Also,
- Xsee the tutorials supplied with the game, which are "csh" shell
- Xscripts that start up example games.
- X
- X.SH OPTIONS
- X.nf
- X [ -options [<options file>]]
- X [ -bases <number of bases> 4 teams max.]
- X [ -rbases <number of randomly placed bases>]
- X [ -armies <size of initial armies> 4 teams max.]
- X [ -militia <density of random militia [1-10]>]
- X [ -towns <density of towns [1-10]>]
- X [ -repeat no argument- allows command repeat]
- X [ -bound no argument- allows multiple commands]
- X [ -march <delay between marches>]
- X [ -erode <time before erosion>]
- X [ -farms <rate of universal troop production [1-10]>]
- X [ -decay <rate of troop decay [1-10]>]
- X [ -fight <firepower for attack [1-10]>]
- X [ -disrupt no argument- stop movement under fire]
- X [ -attack no argument- attack synchronously with "a" key
- X [ -guns <range of artillery [1-10]>]
- X [ -para <range of paratroops [1-10]>]
- X [ -hills <steepness of hills [1-10]>]
- X [ -forest <thickness of forest [1-10]>]
- X [ -sea <amount of water on gameboard [1-10]>]
- X [ -wrap no argument- sets wrap-around mode]
- X [ -seed <random seed for hills, forest & militia>]
- X [ -horizon [<view range of enemy troops>]]
- X [ -hidden no argument- hides enemy command vectors]
- X [ -map no argument- map features as they appear]
- X [ -basemap no argument- map bases/towns as with terrain]
- X [ -localmap no argument- map only local area]
- X [ -dig <cost of terrain digging>]
- X [ -fill <cost of terrain filling>]
- X [ -build <cost of base in full troopsquares>]
- X [ -scuttle no argument- allow base destruction]
- X [ -nogrid no argument- does not display a grid]
- X [ -speed <game speed [1-10]>]
- X [ -square <game square size in pixels>]
- X [ -board <game board size in squares>]
- X [ -manpos no argument- allows manual board placement]
- X [ -area no argument- display troop strength by area
- X [ -hex no argument- use hexagonal game squares
- X [ -move <speed of troop movement [1-10]>]
- X [ -reserve no argument- allow reserves ]
- X [ -digin <dig-in factor [1-10]>]
- X [ -store [<save file>]]
- X [ -replay [<save file>]]
- X [ -edit [<map file>]]
- X [ -load [<map file]]
- X
- X.fi
- X.SH RUN-TIME COMMAND SUMMARY
- X
- X.SH COMMANDS IN GAMEBOARD
- X LEFT MOUSE: toggle command vector to move troops
- X MIDDLE MOUSE: clear all and set new command vector
- X RIGHT MOUSE: repeat previous command (with -repeat)
- X SHIFT-LEFT MOUSE: march (with -march) fork march (with -hex)
- X SHIFT-MIDDLE MOUSE: force march (with -march) fork march (with -hex)
- X SHIFT-RIGHT MOUSE: paratroops (with -para)
- X CONTROL-RIGHT MOUSE: artillery (with -guns)
- X ctrl-'s': pause game
- X ctrl-'q': resume game
- X ctrl-'p': save game state to map file
- X 'a': attack enemy square (-attack)
- X 'b': build base (-build)
- X 's': scuttle base (-scuttle)
- X 'f': fill terrain (-fill)
- X 'd': dig terrain (-dig)
- X 'p': paratroops (with -para)
- X 'g': artillery (with -guns)
- X 'z': cancel all movement
- X {'0'-'9'}: reserve (-reserve)
- X
- X.SH COMMANDS IN TEXT AREA
- X CONTROL-c or CONTROL-q: quit the game
- X CONTROL-w: quit game but watch others play on
- X CONTROL-g: ring bell on all game displays
- X ANY OTHER CHARACTER: append to message string
- X
- X.SH DESCRIPTION
- X
- Xxbattle is a concurrent multi-player battle strategy game that
- Xcaptures the dynamics of a wide range of military situations. The
- Xgame board is a matrix of game squares (or hexagons- see "-hex" option
- Xbelow) which can be occupied by troops of various colors or shades.
- XThe number of troops in a square is indicated by the size of a colored
- Xtroop square (or circle, with "-hex") within the game square. The
- Xtroops are commanded by clicking the mouse near the edge of the square
- Xin the direction that the movement is to take place. The command will
- Xbe acknowledged by the appearance of a command vector, and thereafter,
- Xin each update cycle, a certain proportion of the troops will move
- Xfrom the source square to the destination square until the source
- Xsquare is exhausted. Command vectors can be set in several directions
- Xat once, in which case the movement is divided evenly between the
- Xvector directions, and the command remains active until cancelled.
- XThus a trail of squares can be set up as a supply line that will
- Xdeliver troops steadily at its endpoint. The command vector remains
- Xactive even if the number of troops in that square is zero, although
- Xthe command vector will then be displayed at half length. The game is
- Xconcurrent, so that commands are given continuously by all players
- Xwithout waiting for turns. Different combinations of options create
- Xradically different games, see EXAMPLES below.
- X
- X.SH Team Colors and Displays (-<color>)
- X
- XThe game is started from one display, and each player must play from a
- Xseparate display, players being assigned to a color team by the
- Xcommand line option "-<color> <display>". The parameter <color>
- Xdetermines the color of the troops of that team, which can be either a
- Xmonochrome tone like black, white, dark, light, or a true color like
- Xred, green, blue, cyan, yellow and magenta, although the true colors
- Xwill appear on a monochrome monitor as either black or white with an
- Xidentifying character in each troop square which is the first letter
- Xof the color name. So for instance, the team color "-red" would
- Xappear on a monochrome monitor as black with a letter "R" in the
- Xmiddle of each troop square. A number of people can be assigned to
- Xthe same team by repeating the color for different displays, for
- Xexample "-red display1 -red display2", and each member of the team
- Xwill be able to command any troops of that team. The <display>
- Xargument designates the name of the display on which the team of that
- Xcolor is playing, so each player must be given a color and a display.
- XDisplay names can be found with the unix command "who", which will
- Xlist display names for users in the last column like (cnsxk:0.0). The
- Xsystem console is always designated unix:0.0. The display name can be
- Xmodified for remote games, for example the terminal cnsxk:0.0 on
- Xpark.bu.edu (email address of machine "park") is designated
- Xcnsxk.bu.edu:0.0 . Xbattle recognizes :0.0 as the default (screen
- Xzero on the display), so the :0.0 may be omitted from the display
- Xname. Xbattle also recognizes a special display name "me", which
- Xmeans the display from which the program is started. When playing
- Xbetween color and monochrome displays the colors can be specified more
- Xexactly by concatenating a color name with a monochrome name, for
- Xexample "-redwhite" (color first), which would display that team as
- Xred on color monitors and white on monochrome monitors. All command
- Xline flags and arguments for the game can be given in any order as
- Xlong as the argument directly follows its flag, and most arguments are
- Xscaled to range from 1 to 10, with 5 being the default value. It is
- Xalso possible to set different game parameters for the different
- Xdisplays, so that the game can be biased to favor a less experienced
- Xplayer- see BIASED GAMES below.
- X
- X.SH OPTIONS (-options)
- X
- XA large variety of game options are available to define the parameters
- Xof the game. In essence, xbattle is many thousands of games rolled
- Xinto one. The options can be presented in any order, and may be typed
- Xin with the command line, or they can be stored in an options file
- X(default filename = default.xbo), or some can be stored and others
- Xadded to the command line. The format for the options file is exactly
- Xthe same as the format for the command line except that in the file
- Xeach option (plus argument, where applicable) is placed on a separate
- Xline. So, for example, the game...
- X
- X xbattle -black me -white cnsxk:0.0 -armies 4 -farms 5 -attack
- X
- Xcould also be played with the command...
- X
- X xbattle -black me -white cnsxk:0.0 -options myoptions.xbo
- X
- Xwhere the file myoptions.xbo consists of the lines...
- X
- X -armies 4
- X -farms 5
- X -attack
- X
- XThe only command line entries that can NOT be included in the options
- Xfile are the team color and display arguments.
- X
- X.SH Troops (-bases, -rbases, -armies, -militia)
- X
- XInitial troop allocation is controlled by several command options,
- Xincluding -bases <n>, -rbases <n>, -armies <n> and -militia <n>.
- XArmies and militia are troops on the gameboard, whereas bases which
- Xare indicated by circles on the gameboard, provide a steady supply of
- Xtroops. The -bases option allocates <n> bases to each team,
- Xsymmetrically arranged on the game board, whereas -rbases <n> arranges
- Xthem randomly (which works well with the -horizon option). The
- X-armies option allocates <n> armies (full troop squares) symmetrically
- Xarrayed, whereas -militia <n> scatters militia of random strengths to
- Xrandom locations, with a probabilistic density of <n>. At least one
- Xof these four options is required to provide initial troops for the
- Xgame, and they may be used in combination. The -bases and -armies
- Xoptions will only work for four or less teams.
- X
- X.SH Resupply (-towns, -farms, -decay)
- X
- XThe bases created by the -bases or -rbases, produce a steady supply of
- Xfresh troops. The bases can be occupied by an opposing team, and the
- Xtroops produced by such bases are always the color of the occupying
- Xforce. The capture of all bases thus becomes the strategic objective
- Xof the game. This arrangement simulates desert warfare, as long and
- Xtenuous supply lines develop between the base and the battle areas.
- XAnother form of resupply is provided by the command option "-towns
- X<n>". This produces a number of smaller unoccupied supply sources
- Xscattered randomly over the game board at a density determined by the
- Xargument <n>, and with random rates of troop production, indicated by
- Xthe radius of the circle on the game board. Towns must be occupied by
- Xa team to begin producing troops. This option simulates yet a larger
- Xscale of operation as the combatants battle to occupy the towns. A
- Xmore distributed form of resupply is evoked by the command option
- X"-farms <n>" whereby every square of the game board will produce
- Xtroops as soon as it is occupied, at a rate proportional to the
- Xargument <n>, and the strategic objective becomes the occupation of
- Xthe largest areas of the gameboard. This option simulates a yet
- Xlarger scale of operation and requires complex management of resources
- Xto concentrate the distributed resources and deliver them to the
- Xbattle front. In large scale scenarios additional realism may be
- Xadded by using the -decay option whereby the troop strength in all
- Xtroop squares decays constantly in proportion to the value of the
- Xdecay argument. This reflects the fact that armies constantly consume
- Xresources even while they are idle, and an army without constant
- Xresupply will wither away. With the decay option, a set of bases,
- Xtowns or farms can only support armies of limited size, and the armies
- Xwill dynamically grow or shrink until they reach that size. Since
- Xthis number includes the troops that make up the supply line, the
- Xfighting power of an army diminishes with the length of the supply
- Xline. The default decay value is zero, i.e. no decay. All the
- Xresupply options can be used in any combination.
- X
- X.SH Interactive commands (mouse and keyboard)
- X
- XMovement commands are performed with the left and middle mouse
- Xbuttons, to direct the command vector. A click in the center of the
- Xgame square clears all command vectors; a click near an edge sets the
- Xvector in that direction, and a click near a corner sets the two
- Xadjacent vectors. The left mouse toggles command vectors while the
- Xmiddle mouse clears existing vectors and sets a new vector (An
- Xalternative command system is available, see COMPILATION OPTIONS
- Xbelow). The right mouse is used to repeat the last used command (with
- X-repeat option). The keyboard is interpreted differently depending on
- Xwhether the mouse is positioned on the gameboard or on the text area
- Xbelow. On the gameboard, the the keys control-s and control-q pause
- Xand resume the game respectively. The 'z' key cancels all command
- Xvectors to the square holding the cursor (like a click in the center
- Xof the square). The key control-p saves the current game to a map
- Xfile (see Saving Game State commands below). There are also a variety
- Xof keyboard commands available with different options, to control
- Xspecial functions on the gameboard. These keystrokes are described in
- Xdetail with the description of the appropriate options (see -guns,
- X-para, -build, -scuttle, -fill, -dig, -reserve). In the text area
- Xbelow the keyboard, the keys control-c and control-q both exit the
- Xplayer from the game, although the game continues among the remaining
- Xplayers until they also quit, and the key control-w also exits the
- Xplayer, but allows him to continue watching as the other players play
- Xon. The rest of the keyboard is used for communication between
- Xparticipants through text lines. This is especially useful when
- Xplaying between remote sites- each team has its own text line, and the
- Xcolor of the text matches the color of the team. The control-g key
- Xrings the bell on all displays, which can be used to draw attention to
- Xa new message.
- X
- X.SH Enhanced movement commands (-repeat, -bound, -march, -erode)
- X
- XWith the option "-repeat" you can repeat the last command using the
- Xright mouse. If for example your last command to a square consisted
- Xof a "move up" command by clicking near the top edge of the square,
- Xyou can now command other squares to also move up by clicking in those
- Xsquares with the right mouse. That way you no longer have to aim your
- Xclick exactly at the top side of those squares, but can click the
- Xright mouse anywhere in that square, which saves time. This command
- Xis supported in biased games- i.e. it can be set for one team but not
- Xanother. Commands can be made to apply to more than one square with
- Xthe option "-bound". This is achieved by defining a bounding rectangle
- Xwithin which the command is valid. For instance, to command a block
- Xof squares to all move up simultaneously, you place your mouse near
- Xthe top edge of a square (may be unoccupied, or enemy occupied) and
- Xpress the button (setting the command "go up", then you drag the mouse
- Xto another game square where you release the button. The start and
- Xend squares of the mouse drag define the opposite corners of a
- Xrectangle within which all the game squares occupied by your troops
- Xreceive the command "go up". With the option "-march <n>", troops may
- Xbe commanded to march in a particular direction and to continue in
- Xthat direction without further commands. March commands are activated
- Xwith shift left or shift middle mouse button. For example, if you
- Xclick near the top edge of a square with "shift left mouse", the
- Xtroops will begin to march up, and on arrival in the next square they
- Xwill transfer the march command to that square so that they will
- Xcontinue marching upwards to the next square, and so forth. If a
- Xmarching column encounters hostile forces the march command is
- Xcancelled and the column stops. To prevent marching columns from
- Xtravelling much faster than manually commanded troops, the march
- Xargument <n> defines the number of game update cycles that the troops
- Xmust wait in each new square before marching on to the next square, so
- Xthat "-march 1" will result in a fast march, whereas "-march 10" will
- Xbe slow. The "march command" is indicated on the game board by a
- Xdouble command vector (looks like an "=" sign) in the appropriate
- Xdirection, and the march command is always passed on to the head of
- Xthe column. March commands may be set in squares that are NOT
- Xoccupied by your troops, and will be activated when a marching column
- Xarrives in that square. This allows you to define turns in the path
- Xof the marching column to avoid obstacles. A "stop march" command may
- Xalso be set to program the marching column to stop in that square.
- XThis is achieved by clicking "shift left mouse" in the center of that
- Xsquare, and will be displayed as an empty box in that square. When
- Xset with the left mouse, the march vector is overwritten on to
- Xexisting command vectors encountered in the march path, whereas when
- Xset with the middle mouse the march vector removes and replaces
- Xexisting command vectors. March commands are cancelled by clicking on
- Xthe square without the shift key. March commands may be set in
- Xsquares that are beyond the visible horizon in the normal way , and
- Xwill appear as a double vector in that square so long as that square
- Xis not a "sea" square. If the target square contains invisible enemy
- Xtroops, then the march command vectors will appear initially, but
- Xdisappear again as soon as the enemy is approached close enough to be
- Xvisible. March commands are specific to the team that sets them, and
- Xdifferent march commands may be set by different teams in the same
- Xgame square. The double command vectors are visible only to the team
- Xthat sets them. The command line option "erode <n>" limits the
- Xlongevity of game squares that belong to you but in which there are no
- Xtroops. Normally, a passing column of troops leaves behind it a
- X"supply line" of command vectors that can be used any time in the
- Xfuture to send further troops along the same path, and the game board
- Xeventually becomes cluttered with such supply lines, many of which are
- Xno longer active. With "-erode <n>" such disused supply lines will
- Xbegin to erode away stochastically with time 10*<n> update cycles
- Xafter the time of the last occupation, so that "-erode 1" provides for
- Xfast erosion, whereas "-erode 10" is slow.
- X
- X.SH Combat (-fight, -disrupt, -attack)
- X
- XWhenever troops of different colors occupy the same game square, a
- Xbattle ensues, indicated by concentric squares of the two colors, and
- Xa "crossed swords" (X) symbol. During battle, one or both sides can
- Xincur losses according to a random nonlinear function that
- Xdisproportionately favors the more numerous troops. The steepness of
- Xthe nonlinearity, i.e. the advantage given to the more numerous side,
- Xis controlled by the -fight parameter. A small value will produce
- Xlengthy drawn out battles which favor a defensive strategy, whereas a
- Xlarge value produces quick decisive battles where the random element
- Xis more significant, favoring an offensive strategy even against
- Xsuperior odds. In the absence of the -fight option, the default value
- Xof 5 is used. The -fight parameter is also automatically modulated by
- Xthe game speed parameter (-speed) in order to slow down battles in
- Xfast games and vice versa. Since only 1/3 of the troops can enter a
- Xsquare in each update cycle (with the default -move 5), attackers of a
- Xfull square are always outnumbered initially, unless a coordinated
- Xattack is launched from three sides simultaneously. The -move
- Xargument thus has a significant influence on the efficacy of an
- Xattack. The -disrupt option dictates that when a game square comes
- Xunder attack, all its command vectors are immediately cancelled,
- Xbreaking supply lines which must be repaired by hand after the attack.
- XIn other words, there can be no movement under fire, and even small
- Xforces can be used to provide covering fire to "pin down" a larger
- Xforce, at least until they are counter-attacked and eliminated. A
- Xside effect of this option is that when an attacking square is
- Xcounterattacked, both squares attemp to cancel each other's movement,
- Xi.e. to interrupt the attack. The square that is updated next will
- Xprevail, cancelling the command vector of the other square. Since the
- Xgame squares are updated in a random sequence, there is no telling
- Xwhich square will prevail, and the commander must click repeatedly to
- Xrenew the command vector in order to press home the attack under
- Xopposition. This simulates the tactical situation where a commander
- Xmust personally intervene to ensure the maximal effort is applied at
- Xthe most critical points of the battle. The -attack option helps
- Xsynchronize attacks on an enemy square from different flanks. When
- Xthe mouse is pointed to an enemy troop square and the "a" key is
- Xpressed, all friendly squares adjacent to it commence a simultaneous
- Xattack.
- X
- X.SH Guns and Paratroops (-guns, -para)
- X
- XThe command option -guns <n> enables the shift-right mouse to be used
- Xto control artillery, which can be shot from any occupied gamesquare.
- XThe range and direction of the shot are determined by the position of
- Xthe click in the game square, near center for short range and near the
- Xedge for long range, as modulated by the argument <n>. Every shell
- Xcosts one troop from the source square and destroys one troop at the
- Xdestination square. The fall of shot is indicated by the brief
- Xappearance of a little dot. With the -horizon option the fall of shot
- Xmay not be visible for long range shots, although invisible enemy
- Xtroops will be destroyed where the shell falls. Artillery can damage
- Xboth friend and foe, so it must be used with caution. Paratroops are
- Xenabled by the option -para <n>, and are launched similarly to
- Xartillery using control-right mouse button. The cost of dropping one
- Xtroop at the destination square is three troops from the source
- Xsquare, and the drop zone is indicated by the brief appearance of a
- Xparachute symbol.
- X
- X.SH Environment (-hills, -forest, -sea, -wrap, -seed, -erode)
- X
- XThe command option -hills <n> initializes random hills which restrict
- Xmovement when going from low to high elevation, and enhance movement
- Xfrom high to low, but do not affect movement on the level. The
- Xelevation is indicated by the shade of gray, light for high and dark
- Xfor low on monochrome, and brownish for high and greenish for low on
- Xcolor displays. The argument controls the amount of energy gained and
- Xlost on hills, i.e. the steepness. Hills provide a tactical advantage
- Xwhen attacking downhill. With very steep hills (-hills 9) movement
- Xfrom very low to very high elevation (a cliff) is virtually
- Ximpossible. The command option -forest <n> initializes random forests
- Xwhich restrict movement within the forest, but do not affect movement
- Xfrom thin to thick forest. On both color and monochrome displays,
- Xthick forest is dark, and thin is light. When used in conjunction
- Xwith hills, the forests thickness correlates exactly with hill
- Xelevation. When transitioning from one forest thickness to another,
- Xthe movement is determined by the destination square, not the source
- Xsquare, so that troops deployed within a forest but at the boundary
- Xhave a tactical advantage over those deployed outside the boundary.
- XThe command option -sea <n> generates randomly distributed bodies of
- Xwater, whose prevalance is determined by the argument <n>. Such
- Xbodies of water cannot be crossed by infantry. A small value creates
- Xscattered ponds and lakes, which influences the tactical deployment of
- Xtroops, whereas a large value creates a maze-like pattern of fjords or
- Xrivers which isolate blocks of land into islands which can only be
- Xtaken by paratroops. On monochrome monitors water appears dark
- Xmottled grey, and on color monitors it is pale blue. The command
- Xoption -wrap (no arguments) allows wrap-around on the gameboard. The
- Xcommand option -seed <n> allows control of the random number seed,
- Xotherwise selected based on the process ID and the time, and printed
- Xto the text line. Using the same seed will reproduce the same
- Xconfiguration of hills, towns, seas and militia.
- X
- X.SH Modify Environment (-dig, -fill, -build, -scuttle)
- X
- XThe command options -dig and -fill allow run time modification of the
- Xterrain by digging hills down to lower elevation or filling them up to
- Xhigher elevation. This allows the construction and breaching of
- Xdefensive fortifications. The cost of these operations is one full
- Xtroopsquare, and is accomplished by positioning the mouse on the full
- Xsquare and striking the key "d" for dig, and "f" for fill. With the
- X-sea option, -dig <n> and -fill <n> should be supplied with an
- Xargument, whereby, digging below the lowest elevation produces a sea
- Xat the cost of <n> full troopsquares, which can similarly be filled
- Xback up again at the same cost. The arguments for -dig and -fill must
- Xbe the same value (the second argument given will be applied to both)
- Xand will be ignored for digging and filling of hills. Since it is
- Ximpossible to occupy a 'sea' square to fill it, filling seas is
- Xaccomplished by setting the command vector as if to move into the sea,
- Xand then pressing "f". For all other fill and dig operations the
- Xtroop square may not have any command vectors set. The -build <n> and
- X-scuttle options allow the building and destruction of bases (or
- Xtowns). Building is expensive, and requires <n> full troop squares to
- Xbuild a complete base. When the mouse is positioned on a full troop
- Xsquare and the "b" key is pressed, the troops are exchanged for a 1/n
- Xfraction of a base, displayed as an arc segment. When the capture of
- Xa base by the enemy seems inevitable, it is often advisable to scuttle
- Xthe base to prevent it falling into enemy hands. Scuttling is
- Xperformed by positioning the mouse on the base and pressing the "s"
- Xkey. This reduces the size (and production capacity) of that base by
- Xan amount proportional to the number of troops engaged in the
- Xscuttling, and a proportion of those troops are expended. Usually,
- Xseveral keystrokes are required to complete the destruction. When
- Xused in conjunction with the -build option, instead of reducing the
- Xsize of the base, each scuttle operation removes a section (arc
- Xsegment) of the base proportional to the number of troops engaged in
- Xthe scuttling, such that a full troop square can scuttle the entire
- Xbase with <n> keystrokes. A base will not produce troops if even a
- Xsingle segment is missing, although of course it is less expensive to
- Xrepair (with "b" build) a base with fewer segments missing.
- X
- X.SH Visibility (-horizon, -hidden, -map, -basemap, -localmap, -nogrid)
- X
- XThe command option -horizon <n> restricts the view of enemy troop
- Xdeployment to within <n> squares of any friendly troops. Horizon can
- Xbe called with no argument, in which case the default <n> = 2 is used.
- XIntelligence of more remote regions can be gathered by use of
- Xparatroops. The command option -hidden (no arguments) makes the
- Xcommand vectors of the enemy invisible at any range. The command
- Xoption -map is similar to -horizon except that it restricts your view
- Xof geographical objects as well as enemy troops, although it will
- X"remember" any terrain that you have seen once, as if you had mapped
- Xthat information. The -basemap option maps bases and towns as it does
- Xthe terrain. The option -localmap maps only the local area around
- Xyour troops, and features disappear as you move away again. The
- Xoption -nogrid (no arguments) suppresses the display of a grid on the
- Xgame board.
- X
- X.SH Game Parameters (-speed, -square, -board, -manpos, -area, -hex)
- X
- XThe -speed <n> option controls the speed of the update cycle, making
- Xfor a fast or slow game. A fast game favors quick reaction time and
- Xfast action, whereas a slow game favors strategy and intellect. The
- Xoption -square <size> allows you to set the size of the gamesquares in
- Xpixels, and the option -board <size> allows you to set the size of the
- Xgame board in squares. The option -manpos allows you to position the
- Xgame window manually rather than having it appear automatically at the
- Xupper left origin, which is the default. With the -area option the
- Xnumber of troops in a game square is represented by the area of the
- Xtroop square, rather than by the length of the side (or diameter for
- Xhex). The -hex option creates hexagonal gamesquares with circular
- Xtroop symbols instead of rectangular game and troop squares. Troops
- Xare commanded from hexagonal squares in the usual way, except that
- Xthey will move in one direction only. In order to command movement in
- Xtwo directions simultaneously, locate the mouse near a corner of the
- Xgamehex and hold the shift key while clicking.
- X
- X.SH Troop Movement Parameters (-move, -reserve, -digin)
- X
- XIn each update cycle some fraction of the troops in a game square move
- Xto adjacent squares indicated by the command vectors. The default
- Xfraction is 1/3, so that in each successive cycle, 1/3 of the
- Xremaining troops move out of the square until it is empty. That
- Xfraction is adjusted with the -move argument, 1 for less movement, and
- X10 for more movement. The -reserve option allows the player to define
- Xa level of reserves to remain in the square despite the movement
- Xcommand. For instance a reserve level of 5 would ensure that the
- Xsquare will maintain a reserve of 50% capacity, and movement out of
- Xthat square will only occur with troops in excess of the reserve
- Xlevel. The reserve level is set in a particular game square by
- Xpointing to that square with the mouse and striking a number key, '1'
- Xfor 10% reserves, '2'for 20% reserves, and so forth up to '9' for 90%
- Xreserves. The option -digin <n> simulates the time and effort
- Xrequired for troops to dig in and build fortifications. This is
- Xachieved by reducing the rate of flow of troops into a square as it
- Xfills up to capacity, so that to achieve a really full troop square
- Xthe men must dig in and settle down to accomodate the last arrivals.
- XThe argument <number> modulates the strength of this effect, from 1 to
- X10 for small to large. -digin is supported in the bias mode.
- X
- X.SH Store and Replay (-store, -replay)
- X
- XThe -store <file> option allows you to store the graphics drawing
- Xcommands to a file, which can be viewed later with the -replay <file>
- Xoption. When -replay is used, all other command options are ignored
- Xexcept the -<color> <display> options, which can be used to send the
- Xreplay to other displays. When doing so, only the <display> portion
- Xof the option is used, the <color> is ignored. So, if you play a game
- Xwith many command line parameters and several displays with the
- Xargument -store <file>, after the game you can repeat the same command
- Xline but just change -store to -replay, and the game will be replayed
- Xon the displays of all the original combatants. When xbattle is
- Xcalled with the -replay option alone, the default display will be
- X"me". If store or replay are called without a file name, the default
- Xname "xbattle.xba" will be used. In the replay, the view restrictions
- Xof the -horizon option are deactivated, i.e. all enemy troops are
- Xvisible.
- X
- X.SH Saving Game State Saving, Loading, and Editing (-edit, -load)
- X
- XThe game state can be saved at any point during the game with the
- Xcontrol-p key. This creates a file called "xbattle.xbt", which
- Xrepresents the state of the game board at the time of saving. Future
- Xgames can be started from the saved game state with the command option
- X"-load <file>" where <file> is optional if the file name is
- X"xbattle.xbt". Note that most game parameters ARE NOT STORED. Only
- Xterrain features (forest, hills, seas, towns etc.) and troop
- Xdeployment. This means that if you were playing with -farms, -decay,
- Xand -guns then you will have to type them in if you want them for the
- Xnew game. The terrain and boardsize of the saved map file will
- Xoverride all terrain and boardsize arguments when loaded. Game boards
- Xcan be created or modified with the -edit function, which is called
- Xwith the command option "-edit <file>" where <file> is optional if the
- Xfile name is "xbattle.xbt". With this option, no game is played, but
- Xinstead, the mouse and key commands control the features of the map to
- Xbe edited. To edit an existing file, use "-edit <file>" and type "l"
- Xwhen the editor comes up. This will load the file named in the edit
- Xargument. To save that file, type "d" and the file will be saved to
- Xthe same file name. No provision is made for saving to a different
- Xfile name. When using the edit mode, the command line arguments must
- Xreflect the number and color of players to be used, and the sea,
- Xforest or hills options if they will be required. For example, to
- Xcreate a map called "mymap.xbt" with three color teams and seas, could
- Xuse the command "xbattle -edit mymap.xbt -sea 7 -white me -black you
- X-dark you". Note the use of the special display "you", which is a
- Xdummy display name used as a place holder for the black and dark
- Xcolors. The interactive commands are as follows:
- X
- X left button: lower terrain by one notch (sea lowest)
- X middle button: raise terrain by one notch (sea lowest)
- X right button: toggle between lowest and mid terrain
- X
- X c: create city (growth = 100)
- X t: create town (growth = 80)
- X v: create village (growth = 60)
- X k: increase size of city by 5 percent
- X j: decrease size of city by 5 percent
- X s: scuttle city - remove 36 degrees of arc
- X b: build city - add 36 degrees of arc
- X
- X 0-9: create troop square with troops of current color
- X [: decrease troop amount by 1
- X ]: increase troop amount by 1
- X r: increment current color
- X f: change color of existent troop square
- X d: dump board with name <filename>
- X l: load board with name <filename>
- X e: exit
- X
- X.SH BIASED GAMES
- X
- XThe game can be biased to favor a less experienced player, or for any
- Xother reason, in the following way. In the normal syntax, the command
- Xline argument "-<color>" is immediately followed by the "<display>"
- Xargument, for example "-black me". It is possible to define command
- Xline options that are specific to only one display with the syntax
- X"-<color> { <options> } <display>" where <options> refers to a list of
- Xcommand line options as before, but is included in a set of braces
- Xbetween the team color and the display (note the spaces on either side
- Xof the braces). For example,
- X
- X xbattle -black { -fight 10 } me -white { -fight 5 } cnsxk
- X
- Xwhere black (on display "me") has the advantage of greater firepower
- Xthan white (on display "cnsxk"). Not all options can be biased,
- Xespecially options that control the global behavior of the game, such
- Xas -speed and -board. The options that can be biased are -bases
- X-rbases -armies -militia -guns -para -move -reserve -fight -fill -dig
- X-scuttle -build -hills -forest -decay -nogrid -square -manpos -horizon
- X-map -basemap -localmap -wrap. Note also that if you are using player
- Xspecific and global options, the global options MUST be listed first,
- Xotherwise they will overwrite the play specific options. For example,
- X
- X xbattle -black { -fight 10 } me -white cnsxk -fight 5
- X
- Xwill result in a fight 5 for both players. In order to achieve the
- Xdesired result, the command line must be...
- X
- X xbattle -fight 5 -black { -fight 10 } me -white cnsxk
- X
- Xwhere the local option overwrites only the black team's fight value.
- X
- X.SH EXTENSIONS
- X
- XA great deal of effort has been made in the design of this game to
- Xmake it as simple and modular as possible, with extensive
- Xdocumentation throughout the source code, in the hope that others will
- Xcreate new and exciting variations of the game while maintaining the
- Xelegance and modularity of the original design. I would be grateful
- Xif such variants were sent to us at slehar@park.bu.edu and
- Xlesher@park.bu.edu to be combined into a new version reflecting the
- Xbest of the modifications.
- X
- X.SH EXAMPLES
- X
- XHere are some example games to give an idea of the variability of the
- Xparameters. The first example is a simple symmetrical game between
- X"me" in black on my own display, and a white opponent on the display
- X"cnsxk:0.0". The troops will be rapidly exhausted in this small
- Xskirmish.
- X
- X xbattle -black me -white cnsxk:0.0 -armies 4
- X
- XThe next example adds bases, which will produce a much prolonged
- Xconflict involving long supply lines between the front and the bases,
- Xmuch like desert warfare. One conflict in this battle represents a
- Xskirmish like the entire game of the previous example. In this
- Xexample black is playing on the display cnsxk:0.0, and white is on the
- Xsystem console. Note that the extension ":0.0" can be omitted.
- X
- X xbattle -black cnsxk -white unix -armies 4 -bases 2
- X
- XThe next example is a game with militia scattered around initially,
- Xthat have to race to occupy the towns and link up with their
- Xcompatriots before they can eliminate the enemy. This is a dynamic
- Xscenario requiring tactical and strategic skill and fast reflexes. In
- Xthis example black is playing on cnsxk:0.0 while white is playing on
- Xthe system console of the remote machine thalamus.bu.edu.
- X
- X xbattle -black cnsxk -white thalamus.bu.edu -towns 2 -militia 2 -hills 7
- X
- XHere is a favorite around B.U. where the land is broken up by many
- Xbodies of water creating isolated islands, and view of the enemy is
- Xrestricted to nearby squares, resulting in lots of surprises.
- XParatroops can be used for reconnaisance by launching them into
- Xunknown sectors, and they must be used in conjunction with heavy
- Xartillery barages for airborne assaults from one landmass to the next.
- XIn this example the color display will show cyan and red teams, while
- Xthe monochrome monitor will show white and black teams respectively.
- XThe decay option prevents huge armies from building up at the end of
- Xthe game, and the -store option is used to store this game to the file
- X"battle.xba".
- X
- X xbattle -cyanwhite thalamus:0.0 -redblack cnsxk -rbases 5 -sea 8 -guns 4 -para 4 -horizon 2 -decay 3 -store xbattle.xba
- X
- XNow, the previous stored game is replayed to the original displays by
- Xrepeating the original command line except that -store is changed to
- X-replay. This is convenient if you have command line editing
- Xfacilities.
- X
- X xbattle -cyanwhite thalamus:0.0 -redblack cnsxk -rbases 5 -sea 8 -guns 4 -para 4 -horizon -replay xbattle.xba
- X
- XWith -replay, all arguments are actually ignored except the displays,
- Xso you could achieve exactly the same result with the simpler command
- X
- X xbattle -black thalamus:0.0 -black cnsxk -replay
- X
- Xwhere the -black argument flags the subsequent argument as a
- Xdisplayname, but is otherwise ignored, i.e. any color name would
- Xsuffice. The filename for -replay is omitted, so that the default
- Xfile name "xbattle.xba" is used.
- X
- XThe next example illustrates the use of the options file, tribal.xbo,
- Xto set up a game including, decay, seas, farms, militia, and many
- Xother options.
- X
- X xbattle -black me -white thalamus -options tribal.xbo
- X
- XOptions files can also be read in individually for the two players, as
- Xin the following example...
- X
- X xbattle -options game.xbo -black me -white { -options weak.xbo } thalamus
- X
- XThis results in a biased game where both black and white receive the
- Xoptions defined in game.xbo, and white receives some specific
- Xhandicaps defined in weak.xbo. For example, weak.xbo could define 2
- Xrbases instead of 5, horizon of 1 instead of 2, and lower movement and
- Xfighting values. Since these options overwrite existing options in
- Xgame.xbo, the command line arguments may NOT be typed in arbitrary
- Xorder, because later options overwrite the earlier options, so the
- Xglobal options must be defined before they are overwritten by the
- Xspecific options to the white team.
- X
- X.SH PLAYING TIPS
- X
- XThe first thing you must learn is to click quickly and accurately on
- Xthe gamesquares. Do not focus your attention on one region of the
- Xboard, but scan the whole board frequently. Look at the big picture-
- Xcapture the towns that will support each other, especially a well
- Xpositioned cluster of big towns. Eliminate all enemy troops from your
- Xrear, and advance outwards, preferably from a corner, with a well
- Xsupplied front. Travel in convoy for speed and efficiency in safe
- Xregions, especially if you are playing with -decay, but fan out near
- Xthe enemy to provide alternate routes to a broad front (click on the
- Xcorner to open two command vectors simultaneously). Avoid head-on
- Xassaults on the enemy, but rather dig in and wait for him to attack
- Xwhile you try to turn his flank and cut off his supplies to the front,
- Xor concentrate at his weakest points. Go for the jugular- attack his
- Xsupply sources directly. When advancing, try to attack weak squares
- Xwith strong ones to gain maximum advantage, and be alert for losing
- Xbattles of your weak squares pouring into a strong enemy square, which
- Xwill drain your resources until you cancel the attack and build up
- Xreserves. If however you are fighting a delaying action, or
- Xretreating under fire then you should attack strong enemy squares with
- Xyour weak ones on a broad front to conserve resources. This is
- Xparticularly effective with the -disrupt option. Always try to attack
- Xa square from two or more sides, and build up sufficient strength
- Xbefore launching an attack on a large square. Always consider the
- X"manufacturing capacity" of the enemy, i.e. the number and size of
- Xbases and towns, as the one with the most capacity will eventually
- Xwin. Watch out for single enemy commandos near your unprotected
- Xbases, especially when playing with paratroops, and use such commandos
- Xto good effect against an inattentive opponent. You can keep a base
- Xfortified while sending troops to the front by use of recurrent
- Xconnections, going in loops or in both directions, or by establishing
- Xdead-end branches along the supply line to accumulate local reserves.
- XYou should always have a few strong reserves near your base when
- Xplaying with -horizon or -para, to ensure against surprise attacks.
- XWhen playing with hills, a cliff is best climbed in parallel, i.e. by
- Xsplitting the convoy into multiple parallel paths up the cliff face,
- Xand the troops can rejoin at the top. When playing with horizon and
- Xparatroops use the paratroops to gather intelligence from beyond the
- Xhorizon. When playing with paratroops or artillery, you can create a
- Xnetwork of recurrent connections near the bases that will provide
- Xmutual protection by automatically sending men into any part of the
- Xnet that is knocked out. Paratroops are expensive, so test the aim
- Xwith artillery (right mouse) before launching the paratroops (shift
- Xright mouse), although this works only if the -para and -guns
- Xarguments are equal. When using artillery, have a large contingent of
- Xinfantry ready to move in immediately after the barage. Paratroops
- Xand artillery are helpful, but it is the grunts that must actually
- Xtake the territory.
- X
- X.SH COMPILATION OPTIONS
- X
- XCertain other game options or alternatives are allowed at compile time
- Xby editing the file "extern.h" and setting certain global flags to
- XTRUE or FALSE, before compiling the program. The flag UNIX should be
- Xset to FALSE if you will be running on a non-unix platform. On unix
- Xsystems the select() function is used to enhance efficiency and reduce
- Xcomputer load. The INVERT flag may be set to FALSE if you do not like
- Xthe appearance of the inverted command vector within the troop square.
- XThe VARMOUSE option may be set to TRUE if you would like the mouse
- Xoperations to be redefined so that the left mouse adds command
- Xvectors, and the middle mouse subtracts such vectors. The flag PAUSE
- Xmay be set to FALSE to disable the ability to pause and resume the
- Xgame with control-s and control-q. The flag NORAND48 must be set to
- XTRUE if your system does not define drand48() and srand48() in the
- Xmath library. The SHOWFLOW flag in extern.h may be set to FALSE to
- Xmake the displayed command vectors remain at full length even when the
- Xtroop strength is zero. The flag NEWCOLORMAP can be set to TRUE to
- Xcreate a private color map for the game, useful when the default color
- Xmap is full. The flag MULTITEXT can be set to FALSE, whereby instead
- Xof having a single text line for each player, two text lines are
- Xshared by all the players. The flag MULTIFLUSH can be set to TRUE,
- Xwhereby command vectors appear immediately after the command is given,
- Xalthough performance is noticably impaired.
- X
- X.SH BUGS
- X
- XWhen the system is slow, there is a noticable time lag between the
- Xmouse positioning and the keystroke registration, so that a keystroke
- Xfor a square pointed to by the mouse might be actually recorded in the
- Xnext square the mouse moves to. Similarly, a shifted mouse click (as
- Xfor paratroops) might be delayed so that by the time it is processed
- Xthe shift key is no longer being depressed, and it is recorded as an
- Xunshifted mouse click (as for artillery). Under such circumstances,
- Xavoid issuing rapid command sequences. When playing a remote site
- Xover the network, there is often a lag between the displays, and the
- Xremote site plays at a disadvantage. This problem is somewhat
- Xalleviated by using a slow -speed value. When the -disrupt option is
- Xused, the multiple clicks required to press home an attack can bog
- Xdown the event queue and lead to slow execution. The shade "gray2" is
- Xavailable, although on monochrome monitors it will appear the same
- Xcolor as the background, therefore this is a "stealth" color. Some
- Xsystems do not support the random functions drand48() and srand48(),
- Xon such systems the flag NODRAND48 should be set to TRUE in
- Xexternals.h before compilation. When installing xbattle on a NON-unix
- Xsystem, the flag UNIX must be set to FALSE in the file externals.h to
- Xprevent the use of the unix select() function, which will result in
- Xgreater computer load. Occasionally an "invisible" sea square is
- Xgenerated, into which troops cannot be moved. The options file does
- Xnot accept the team color / display combination. When a {player
- Xspecific option} is followed by a universal option, the former is
- Xoverwritten by the latter, so the {player specific option} should
- Xalways follow the universal option. The "-hex" option will not
- Xsupport the "-horizon" and "-wrap" options simultaneously.
- X
- X
- X.SH AUTHORS
- X
- XSteve Lehar, Boston University (slehar@park.bu.edu) and Greg Lesher
- X(lesher@park.bu.edu), and some sections of code from Mark Lauer
- X(elric@basser.cs.su.oz.au). Helpful suggestions, bug reports, and
- Xideas were gratefully received from numerous contributors from all
- Xover the world.
- END_OF_FILE
- if test 47864 -ne `wc -c <'xbattle.man'`; then
- echo shar: \"'xbattle.man'\" unpacked with wrong size!
- fi
- # end of 'xbattle.man'
- fi
- echo shar: End of archive 3 \(of 7\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-