home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / WIN_GAME / SKRMISH.ZIP / MANUAL.TXT < prev    next >
Text File  |  1993-12-30  |  20KB  |  473 lines

  1.  
  2. SKIRMISH -- Version 1.0
  3. A Programming Game of Strategy and Chaos
  4. by Richard Shock
  5. Copyright 1994
  6.  
  7. Disclaimer:
  8.  
  9. This game is in its earliest form.  There are countless bugs, 
  10. glitches, and logical discontinuities.  While I don't see how it 
  11. could possibly screw up anything on your computer, I assume no 
  12. responsibility if you manage to make that happen.
  13.  
  14. Skirmish is SLOW.  This is partly because I wrote it in clunky old 
  15. Pascal, and partly because I have yet to optimize it.  You would 
  16. find very little elegance in my code, and perhaps several 
  17. oversights.
  18.  
  19. I would be interested in hearing about any serious suggestions or 
  20. bugs.  If I use your contribution, I'll include your name in the 
  21. next distributed version of Skirmish, assuming there IS one.  (You 
  22. won't receive any cut of registration fees, though.  No big deal, 
  23. since these never come to much.)
  24.  
  25.  
  26. Introduction:
  27.  
  28. Complex systems lend themselves to Chaos, an unpredictable sequence 
  29. of events that are extremely sensitive to initial conditions.  Even 
  30. if every ship in Skirmish has the same set of programs, a chaotic 
  31. outcome will usually result.  Changing the initial positions of a 
  32. single ship by even one unit can lead to a wildly different outcome 
  33. for any particular run.
  34.  
  35. The good news is that Chaos DOES sometimes follow a pattern.  These 
  36. patterns involve events that recur almost randomly within certain 
  37. boundaries, termed "Strange Attractors."  Imagine for example a 
  38. pendulum swinging in the breeze.  Depending on effectively random 
  39. air patterns, the pendulum's arc may take it around in endless 
  40. patterns, all of which are maximally limited by the length of the 
  41. pendulum's string.  This string might be considered the strange 
  42. attractor's physical manifestation.
  43.  
  44. In Skirmish, strange attractors amount to STRATEGY.  Although we 
  45. may never know exactly what will happen with a combination of ship 
  46. positions and programming, by methodical experimentation we CAN 
  47. establish that certain fleet configurations tend to win out over 
  48. certain other fleet configurations.  The trick to playing this game 
  49. is to learn these advantaged configurations and apply them against 
  50. your opponents.  Obviously no one will win all the time, so match 
  51. results ought to be averaged.
  52.  
  53. Broadly speaking, Skirmish reflects how we deal with all real-world 
  54. situations.  Life IS Chaos, and most of our behaviors are designed 
  55. to navigate us into the safe haven of a relatively predictable 
  56. strange attractor.  Isn't the universe easy when you know the 
  57. secret?
  58.  
  59.  
  60. Directions:
  61.  
  62. Skirmish comes with simple Help dialogs that briefly outline the 
  63. basics.  Please refer to these.
  64.  
  65. For those who want an immediate example, following these steps:
  66.  
  67. 1)  Enter Skirmish.
  68.  
  69. 2)  In the File menu, select Open Configuation.
  70.  
  71. 3)  From this, choose "EXAMPLE1.CON."  Two fleets of ships should 
  72. appear on the screen.
  73.  
  74. 4)  In the Control menu, select Run/Resume.
  75.  
  76. 5)  Sit back and watch the battle.  (Select Stop from the Control 
  77. menu when you've seen enough.)
  78.  
  79.  
  80. Programming Manual:
  81.  
  82. Skirmish ships use programs written in a very limited microcode.  
  83. You may compose Skirmish programs with the onboard dialog boxes, or 
  84. in any application that edits ASCII text.  Microcode programs have 
  85. a suffix of either .ABS or .IFS, respectively for Absolute programs 
  86. and Contingency programs.
  87.  
  88. Programs in a ship's Absolute program slot supersede all other 
  89. programming, causing the ship to ignore everything in its 
  90. Contingency and Default program slots.  Contingency programs have a 
  91. set of conditions that are checked each turn;  if the conditions 
  92. are met, the Contingency program's results suddenly become 
  93. absolute, superseding all other Contingency and Default programming 
  94. until they finish.  Programs in the Default slot are run whenever 
  95. no Contingency conditions are matched.  Default programs are never 
  96. absolute, and will be interrupted at any step to carry out a 
  97. triggered Contingency result.
  98.  
  99. Both Absolute and Default programs will loop back to their 
  100. beginning once they finish.
  101.  
  102. After you've loaded a particular ship's slots with programs and 
  103. return to the main window, Skirmish automatically compiles the 
  104. programs listed for that ship.  If one of these programs has a bug 
  105. in syntax or logic, a message box will come up to tell you the 
  106. incorrect program line.  No part of that program will remain 
  107. compiled to the ship.
  108.  
  109. Basic microcode statements are as follows:
  110.  
  111. * filename -- any previously written microcode program can be 
  112. included in another microcode program by starting a line with * 
  113. (asterisk) and the desired microcode's proper directory location 
  114. and filename.  In fact, this is the usual method the Contingency 
  115. Program Dialog utilizes to write a result.  Note that the "* 
  116. filename" form can be recursed approximately five deep: * file 
  117. within * file within * file within * file within * file.
  118.  
  119. ANGLE n -- Turns a ship to angle n.  "n" is an integer between 0 
  120. and 359.  "n" greater than 360 will cause the ship to turn at a 
  121. random angle.
  122.  
  123. DEADSTOP -- This will bring a ship to an immediate halt, against 
  124. all known laws of physics.
  125.  
  126. DELAY n -- A ship will do nothing for a period defined by n turns 
  127. (or "steps," as displayed in the Skirmish Window Text during a 
  128. run).  "n" is a positive integer.
  129.  
  130. EVADE identity d [also, SEEK identity d] -- Turns a ship in the 
  131. direction of the nearest object matching the stated "identity," 
  132. then adds an angle of d.  [Identities include ENEMY, ENEMYMISSILE, 
  133. ENEMYMOTHERSHIP, ALLY, ALLYMISSILE, ALLYMOTHERSHIP, and SELF.]  
  134. "EVADE ENEMY 180" means to turn 180 degrees away from the nearest 
  135. enemy ship.  "EVADE ENEMY 0" would turn the ship directly TOWARD 
  136. the nearest enemy (hence the alternative, SEEK).  "n" is an integer 
  137. degree value from 0 to 359.  If n>360 or EVADE SELF n, the ship 
  138. will turn in a random direction.
  139.  
  140. EVADE PARALLEL identity d -- Much like the simple evasion, except 
  141. that it gives you the angle of the ship you wish to evade 
  142. (identity), then adds d degrees to that.  This can be useful for 
  143. preventing allies from running into each other by putting them back 
  144. on a parallel course.
  145.  
  146. FIRE -- Fires a ballistic missile in the direction the ship is 
  147. turned.  Missile speed is partly dependent on ship speed.  Missiles 
  148. last only 15 turns before deactivating and disappearing.  Missiles 
  149. never collide with other missiles, and are not programable.
  150.  
  151. IF (condition)(condition)... -- The header of all Contingency 
  152. programs, but capable inclusion into the body of both Contingency 
  153. and Absolute programs.  See "Contingency Arrangements" for a full 
  154. discussion and examples.
  155.  
  156. SEEK identity n -- (See EVADE.)
  157.  
  158. SELFDESTRUCT -- Blows up a ship so that everything within a 50 unit 
  159. radius is also destroyed.  (Motherships destroy everything within 
  160. 100 units.)  Most often used when a ship is within range of more 
  161. than two enemies at once.
  162.  
  163. SPEED n -- accelerates a ship to n units every turn.  If n is 
  164. greater than 30, speed is set randomly.
  165.  
  166.  
  167. Contingency Arrangements
  168.  
  169. Contingency programs always begin with a collection of conditions, 
  170. each bounded by parentheses.  Conditions take the general form:
  171.  
  172. (identity RANGE vvv NUMBER www RATE xxx BEARING yyy zzz)
  173.  
  174. where identities include ENEMY, ENEMYMISSILE, ENEMYMOTHERSHIP, 
  175. ALLY, ALLYMISSILE, ALLYMOTHERSHIP, and SELF, and www, xxx, yyy, and 
  176. zzz are integers lengthened to three digits by initial zeroes.  
  177. Please note that spacing in this statement is RIGID;  there must be 
  178. ONE AND ONLY ONE space between each trait and its numeric value.
  179.  
  180. Only one trait (RANGE, NUMBER, RATE, BEARING) need be stated for 
  181. each conditional statement, though all may be included.
  182.  
  183. There is an implicit AND between all conditions and traits.
  184.  
  185. (OR's can be approximated by other Contingency programs with 
  186. similar results.  For example, if you wanted a ship to SELFDESTRUCT 
  187. when it was in range of either an ALLY or an ENEMY, you'd give that 
  188. ship one contingency program to SELFDESTRUCT near an ALLY and 
  189. another to SELFDESTRUCT near an enemy.  Though why you'd want to do 
  190. this, I have no idea.)
  191.  
  192. The relationship between each trait and its numeric value is 
  193. assumed to be "less than or equal two."  A "greater than" 
  194. relationship can be accomplished by placing ">" in the space 
  195. between the trait and its value, eg. (ENEMY NUMBER>002).
  196.  
  197. Results for Contingencies are always bounded by BEGIN and END.  
  198. (The Pascal/Basic/etc. "THEN" isn't necessary.)  Statements on 
  199. lines between BEGIN and END can be indented to aid in coherency, 
  200. but it isn't necessary.
  201.  
  202. Since Contigency program results become absolute until they finish 
  203. their sequence, it's best to keep these result sequences BRIEF.  
  204. This avoids interfering with other Contingencies, which might just 
  205. save the life of your ship.  For instance, if a ship has a 
  206. Contingency program to constantly dodge ally ships, you don't want 
  207. it looking the other way while trying to fly in formation.
  208.  
  209. Now for Contingency examples:
  210.  
  211. IF (ENEMY RANGE 050 NUMBER>001)
  212. BEGIN
  213.   SELFDESTRUCT
  214. END
  215.  
  216. The purpose of this Contingency Program (included with the Skirmish 
  217. package as SBOMB1.IFS) is fairly clear:  If there is more than one 
  218. enemy within a range of 50 units, self destruct.  This would of 
  219. course give your ship a 2:1 kill ratio.
  220.  
  221. Note that only one condition with two traits is mentioned.
  222.  
  223. IF (ENEMY RANGE 050 NUMBER>001) (ALLY RANGE 050 NUMBER 000)
  224. BEGIN
  225.   SELFDESTRUCT
  226. END
  227.  
  228. This variation on SBOMB2.IFS shows the beginnings of Skirmish's 
  229. slightly weird logic.  Not only must two or more enemies be in a 
  230. range of 50 units, zero allies must be in that same range.  (This 
  231. makes sense, unless you want to lose your acceptable kill ratio.)  
  232. For you non-programmers, Condition 1 AND Condition true must both 
  233. be true for the ship to self destruct.
  234.  
  235. Let's say we wanted a ship to self destruct if two or more enemies 
  236. were in range OR a certain number of missiles were in range.  Since 
  237. SELFDESTRUCT wipes out missiles as well as ships, we might 
  238. sacrifice one of our ships to clear a particularly thick hailstorm 
  239. of fire.  While we could write:
  240.  
  241. IF (ENEMY RANGE 050 NUMBER>001) (ALLY RANGE 050 NUMBER 000)
  242.       (ENEMYMISSILE RANGE 050 NUMBER>010)
  243.  
  244. THIS WOULDN'T DO MUCH.  What we'd be saying was that the ship would 
  245. self destruct only when (1) more than two enemies were in range AND 
  246. (2) no allies were in range AND (3) MORE THAN TEN MISSILES WERE IN 
  247. RANGE.  (NOTE:  all parentheses-enclosed conditions in a 
  248. Contingency statement should be on a SINGLE LINE.  The example here 
  249. just wraps down to the next line in order to save space.)
  250.  
  251. What we WANTED was for the ship to self destruct when ten missiles 
  252. or more are in range, without consideration for ships.  All you'd 
  253. need to do is write:
  254.  
  255. IF (ENEMYMISSILE RANGE 050 NUMBER>010)
  256.  
  257. And then put this program in one of your ship's Contingency slots.  
  258. This program is SBOMB3.IFS.  It might be loaded into a ship like 
  259. this:
  260.  
  261. Contingency #1 = SBOMB2.IFS
  262. Contingency #2 = SBOMB3.IFS
  263. Contingency #3 =
  264. Contingency #4 =
  265. ...
  266.  
  267. [I know I'm taking this slowly, but bear with me.  The thinking IS 
  268. a little convoluted.]
  269.  
  270. THAT's how we create OR statements.  Parallel Contingencies ALL 
  271. constitute one big OR here.
  272.  
  273. Now things get very skewed.  What would do you think I'd be saying 
  274. if I wrote the following?
  275.  
  276. IF (ENEMY RANGE 100 NUMBER 003 RATE 010)
  277.  
  278. You MIGHT believe this condition would come true if 3 enemies were 
  279. in a range of 100 units and all were going at rate (speed) 10.  You 
  280. might believe it, but you'd be wrong.  Since there's an implied 
  281. "less than or equal to" for each of these traits, ANY rate less 
  282. than or equal to 10 would make it true.  Therefore, this statement 
  283. would come true if 2 ships were 50 units away and one was moving at 
  284. speed 4 while the other moved at speed 9.  Only if one of these 
  285. ships suddenly went to speed 11 or greater would the statement be 
  286. false.
  287.  
  288. The fourth possible trait, BEARING, is slightly different.  A 
  289. ship's bearing in this case is simply the absolute angle at which 
  290. it's traveling, from 0 to 359.  Note that in the original blank IF 
  291. statement, both yyy and zzz came after BEARING.  These two 
  292. quantities represent an arc, such as arc between 20 degrees and 30 
  293. degrees or between 0 degrees and 90 degrees.  If you wanted to be 
  294. very specific for a condition, you might try:
  295.  
  296. IF (ENEMY BEARING 090 090)
  297.  
  298. Meaning that if an enemy (since range is unspecified, that means 
  299. ANY enemy) is traveling at exactly a 90 degree angle, the condition 
  300. is true.  It would probably be more useful to open up the 
  301. possibilities, such as:
  302.  
  303. IF (ENEMY BEARING 030 050)
  304.  
  305. Which gives the enemy ships a good 20 degree arc to match.
  306.  
  307. "Greater than" is slightly different with BEARING as well:
  308.  
  309. IF (ENEMY BEARING>030 050)
  310.  
  311. This would mean that an enemy can move in any arc EXCEPT 30-50 to 
  312. make the statement come true.  That's a good 340 degrees of 
  313. possibilities.
  314.  
  315. Contingency statements in Skirmish have a single alternative to the 
  316. normal trait set:
  317.  
  318. IF (ENEMY COLLISION)
  319.  
  320. COLLISION checks to see if your current ship is on a collision 
  321. course with an the identity, in this case an enemy.  Since range 
  322. isn't specified, it's very likely any two ships will eventually 
  323. collide (unless they're moving at parallel angles).  An open 
  324. COLLISION like this leads to some erratic and unnecessary events.  
  325. To alleviate this, use:
  326.  
  327. IF (ENEMY COLLISION RANGE 100)
  328.  
  329. (Or whatever range you want.)  This simply checks to see if your 
  330. ship will collide with an enemy ship within a range of 100 units.
  331.  
  332. No other trait except RANGE currently works with COLLISION.  Note 
  333. also that RANGE>www is equivalent to RANGE www here.
  334.  
  335.  
  336. The Skirmish Microcode Failings
  337.  
  338. Obviously the Skirmish microcode interpreter is NOT a complete 
  339. language.  Some of its glaring omissions include:
  340.  
  341. -- Variables
  342. -- Subprogram handling
  343. -- Repeat routines (such as for-do statements in Pascal)
  344. -- Broad Boolean logic in conditional statements (such as NOT, OR,
  345.    AND, <, and =)
  346. -- Arithmetic functions
  347.  
  348. Whew, quite a list!  Still, we're dealing with a purposefully 
  349. limited abstract system here.  Spaceships in a rather blank 
  350. environment have little need to balance checkbooks or parse 
  351. colloquial English.  Once again, Skirmish is a game, not a new 
  352. programming language.
  353.  
  354. In the future I MAY add some of new features, but don't bet on it.  
  355. Improvements will all depend on comments from the people who use 
  356. this program.
  357.  
  358.  
  359. Possible Methods For Playing Skirmish
  360.  
  361. While there's a lot to be learned from giving every ship in both 
  362. fleets the same programming, weird and wonderful things begin 
  363. happening when each ship is an individual.  Perhaps one of your 
  364. ships will be stationary sniper, waiting in one spot until enemy 
  365. ships come within range, then turning on them and blasting away.  
  366. (Sometimes this seems to work best for the Motherships, which 
  367. shouldn't enter the fray.)  Perhaps you'll designate a single ship 
  368. as a dedicated assassin, forcing it to ignore everything else and 
  369. seek out only the enemy Mothership (KAMIKAZE.ABS).  Perhaps you'll 
  370. use one of your ships as a missile screen, self destructing should 
  371. too many missiles come near it.  Perhaps you'll program ships to go 
  372. into berserker mode when only a certain number of their allies 
  373. remain (such as LAST.IFS).  The possibilities are nearly endless.
  374.  
  375. Should you find a human opponent, games become even more 
  376. intriguing.  Since positioning of ships can be a vital advantage, 
  377. both sides should want an arrangement that best reacts to their 
  378. enemy's.  You might flip a coin to see you positions all his ships 
  379. first, or you might take turns positioning one ship at a time.
  380.  
  381. Adding programs between opponents could be either open or secret.  
  382. If the procedure is open, you might take turns as you did with 
  383. positioning.  Secret programming might lead to some VERY surprising 
  384. games.
  385.  
  386. But aside from what I've programmed into the system, Skirmish has 
  387. no hard and fast rules.  Losers might be the first ones to lose 
  388. their Motherships, they might be determined by the fewest number of 
  389. ships left after a set time, or they might be the side with no 
  390. ships remaining in the end.  It's up to you.
  391.  
  392.  
  393. Inclusions and Explanations
  394.  
  395. Along with the SKIRMISH.ZIP package you should find the following 
  396. Configuration Files and microcode Program Files:
  397.  
  398. EXAMPLE1.CON -- Mutual destruction, a tie.  (You see that a lot
  399.                 when both sides have the same programming, as in
  400.                 the majority of these example configurations.)
  401.  
  402. EXAMPLE2.CON -- Green wins against a geometric Red formation.
  403.  
  404. EXAMPLE3.CON -- Red wins in a lopsided arrow formation.
  405.  
  406. EXAMPLE4.CON -- Green wins by keeping back one extra ship until all
  407.                 of its allies are destroyed.  (See LAST.IFS.)
  408.  
  409. EXAMPLE5.CON -- Green wins by using one KAMIKAZE.ABS ship.  Red's
  410.                 Mothership tries to escape with AUTODEF.IFS and
  411.                 three stationary ships using DEFENDER.IFS.
  412.  
  413. HUNT.ABS -- Aims the ship toward the nearest enemy, sets it in
  414.             motion, fires, then repeats the process.  Surprisingly
  415.             effective for its simplicity.  Good for both Absolute
  416.             or Default slots.
  417.  
  418. JUGGERNT.ABS -- The Ship always runs straight ahead, but aims on
  419.                 the fly to fire at enemies.  A good program for the
  420.                 Absolute slot.
  421.  
  422. BERSERK.ABS -- Ship aims at nearest enemies, dives at speed 20, and
  423.                fires a steady stream.  (A good reason to create
  424.                programs that fire at any ship traveling faster than
  425.                10.)
  426.  
  427. KAMIKAZE.ABS -- Dives directly at enemy mothership, speed 25, while
  428.                 firing steadily.  Self destructs when its work is
  429.                 done.
  430.  
  431. AUTODEF.IFS -- If an enemy goes into BERSERK.ABS or KAMIKAZE.ABS
  432.                speed (>15), the ship will run at right angles to
  433.                the attack.  Most useful for Motherships under
  434.                attack with KAMIKAZE.ABS (see EXAMPLE5.CON).
  435.  
  436. DEFENDER.IFS -- The ship fires at any enemy running at speed of
  437.                 greater than 15 (see EXAMPLE5.CON).
  438.  
  439. SHOOT.IFS -- If an enemy comes within range (experiment with
  440.              varying range), the ship aims and fires at it without
  441.              moving from its spot.
  442.  
  443. SBOMB1.IFS -- If the ship comes within range of two or more
  444.               enemies, it self destructs, taking them with it.
  445.  
  446. SBOMB2.IFS -- If the ships comes within range of two or more
  447.               enemies, and if no allies are in range, it self
  448.               destructs.
  449.  
  450. SBOMB3.IFS -- The ship self destructs of two many missiles come
  451.               near it, screening ships behind it.
  452.  
  453. DODGE-EN.IFS -- If a ship is going to collide with an enemy, it
  454.                 dodges.  (Doesn't always work, for reasons you'll
  455.                 have to figure out.)
  456.  
  457. DODGE-AL.IFS -- If a ship is going to collide with an ally, it
  458.                 takes a course parallel to that ally.
  459.  
  460. LAST.IFS -- If there are only two allies left alive, the ship goes
  461.             into a HUNT.ABS-style pattern, aiming, diving, and
  462.             firing.  (Sometimes it's useful to keep HUNT.ABS out of
  463.             a ship's Default slot, so that it just sits until
  464.             needed.  This program brings it into action.)
  465.  
  466. These are only the barest examples.  I don't begin to understand 
  467. this game;  I only wrote it.
  468.  
  469. Good Luck,
  470. Richard Shock
  471. January, 1994
  472.  
  473.