route: ensure RTM_IFINFO is sent first when bring interface down/up
[dragonfly.git] / games / sail / sail.6
1 .\"     $NetBSD: sail.6,v 1.18 2009/03/02 10:16:54 dholland Exp $
2 .\"
3 .\" Copyright (c) 1988, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     @(#)sail.6      8.3 (Berkeley) 6/1/94
31 .\"
32 .Dd March 2, 2009
33 .Dt SAIL 6
34 .Os
35 .Sh NAME
36 .Nm sail
37 .Nd multi-user wooden ships and iron men
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl bx
41 .Op Fl s Op Fl l
42 .Op Ar num
43 .Sh DESCRIPTION
44 .Nm
45 is a computer version of Avalon Hill's game of fighting sail
46 originally developed by S. Craig Taylor.
47 .Pp
48 Players of
49 .Nm
50 take command of an old-fashioned Man of War and fight other
51 players or the computer.
52 They may re-enact one of the many
53 historical sea battles recorded in the game, or they can choose
54 a fictional battle.
55 .Pp
56 As a sea captain in the
57 .Nm Sail
58 Navy, the player has complete control over the workings of his ship.
59 He must order every maneuver, change the set of his sails, and judge the
60 right moment to let loose the terrible destruction of his broadsides.
61 In addition to fighting the enemy, he must harness the powers of the wind
62 and sea to make them work for him.
63 The outcome of many battles during the
64 age of sail was decided by the ability of one captain to hold the
65 .Sq weather gage .
66 .Pp
67 The flags are:
68 .Bl -tag -width flag -compact
69 .It Fl b
70 No bells.
71 .It Fl l
72 Show the login name.
73 Only effective with
74 .Fl s .
75 .It Fl s
76 Print the names and ships of the top ten sailors.
77 .It Fl x
78 Play the first available ship instead of prompting for a choice.
79 .El
80 .Sh IMPLEMENTATION
81 .Nm
82 is a multiplayer game.
83 Each player runs
84 .Nm
85 to either connect to an existing game or start a new one.
86 The game server (or
87 .Dq driver )
88 is an extra fork of the
89 .Nm
90 program created when a game is started.
91 The driver coordinates the game and runs the computer ships.
92 .\" .Pp
93 .\" Because the
94 .\" driver
95 .\" must calculate moves for each ship it controls, the
96 .\" more ships the computer is playing, the slower the game will appear.
97 .Pp
98 If a player joins a game in progress, a synchronization process occurs
99 .Pq a rather slow process for everyone ,
100 and then the game continues.
101 .Pp
102 Note that while each scenario can be running independently with
103 different players, each scenario can also only be running once at any
104 given time.
105 .Ss COMMUNICATION
106 To implement a multi-user game in Version 7 UNIX, which was the operating
107 system
108 .Nm
109 was first written under, the communicating processes must use a common
110 temporary file as a place to read and write messages.
111 For e.g. scenario 21, this file is
112 .Pa /var/games/sail/#sailsink.21 .
113 Corresponding file names are used for the other scenarios.
114 .Pp
115 In addition, a locking mechanism must be provided to ensure exclusive
116 access to the shared file.
117 .Nm
118 uses a technique stolen from an old game called
119 .Dq pubcaves
120 by Jeff Cohen.
121 Processes do a busy wait in the loop
122 .Bd -literal -offset indent
123 for (n = 0; link(sync_file, sync_lock) \*[Lt] 0 \*[Am]\*[Am] n \*[Lt] 30; n++)
124         sleep(2);
125
126 .Ed
127 until they are able to create a hard link named e.g.
128 .Pa /var/games/sail/#saillock.21 .
129 where 21 is again the scenario number.
130 Since creating a hard link is atomic, a process where this succeeds
131 will have exclusive access to the temporary file.
132 .Ss CONSEQUENCES OF SEPARATE PLAYER AND DRIVER PROCESSES
133 When players do something of global interest, such as moving or firing,
134 the driver must coordinate the action with the other ships in the game.
135 For example, if a player wants to move in a certain direction, he writes a
136 message into the temporary file requesting the driver to move his ship.
137 Each
138 .Dq turn ,
139 the driver reads all the messages sent from the players and
140 decides what happened.
141 It then writes back into the temporary file new values of variables, etc.
142 .Pp
143 The most noticeable effect this communication has on the game is the
144 delay in moving.
145 Suppose a player types a move for his ship and hits return.
146 What happens then?
147 The player process saves up messages to
148 be written to the temporary file in a buffer.
149 Every 7 seconds or so, the player process gets exclusive access to
150 the temporary file and writes out its buffer to the file.
151 The driver, running asynchronously, must
152 read in the movement command, process it, and write out the results.
153 This takes two exclusive accesses to the temporary file.
154 Finally, when the player process gets around to doing another 7-second
155 update, the results of the move are displayed on the screen.
156 Hence, every movement requires four
157 exclusive accesses to the temporary file (anywhere from 7 to 21 seconds
158 depending upon asynchrony) before the player sees the results of his moves.
159 .Pp
160 In practice, the delays are not as annoying as they would appear.
161 There is room for
162 .Dq pipelining
163 in the movement.
164 After the player writes out
165 a first movement message, a second movement command can then be issued.
166 The first message will be in the temporary file waiting for the driver, and
167 the second will be in the file buffer waiting to be written to the file.
168 Thus, by always typing moves a turn ahead of the time, the player can
169 sail around quite quickly.
170 .Pp
171 If the player types several movement commands between two 7-second updates,
172 only the last movement command typed will be seen by the driver.
173 Movement commands within the same update
174 .Dq overwrite
175 each other, in a sense.
176 .Ss DEFECTS OF THIS SYSTEM IN THE MODERN WORLD
177 Quite a few.
178 .Pp
179 It should be thrown out and replaced with something socket-based.
180 .Sh HISTORICAL INFO
181 Old square-riggers were very maneuverable ships capable of intricate
182 sailing.
183 Their only disadvantage was an inability to sail very close to the wind.
184 The design of a wooden ship allowed for the guns to bear only to the
185 left and right sides.
186 A few guns of small
187 aspect (usually 6 or 9 pounders) could point forward, but their
188 effect was small compared to a 68 gun broadside of 24- or 32-pounders.
189 The guns bear approximately like so:
190 .Bd -literal -offset indent
191
192        \\
193         b----------------
194     ---0
195         \\
196          \\
197           \\     up to a range of ten (for round shot)
198            \\
199             \\
200              \\
201
202 .Ed
203 Firing a broadside into a ship lengthwise, from bow to stern or stern
204 to bow, is called
205 .Em raking .
206 This did a great deal more damage, because the shot tended to bounce
207 along the deck.
208 Because the bows of a ship are very strong and present a smaller
209 target than the stern, a stern rake (firing from the stern to the bow) causes
210 more damage than a bow rake.
211 .Bd -literal -offset indent
212
213                         b
214                        00   ----  Stern rake!
215                          a
216
217 .Ed
218 Most ships were equipped with
219 .Em carronades ,
220 which were very large, close range cannons.
221 American ships from the revolution until the War of 1812
222 were almost entirely armed with carronades.
223 .Pp
224 The period of history covered in
225 .Nm
226 is approximately from the 1770's until the end of Napoleonic France in 1815.
227 There are many excellent books about the age of sail.
228 .Pq See Sx REFERENCES .
229 .Pp
230 Fighting ships came in several sizes classed by armament.
231 The mainstays of
232 any fleet were its
233 .Em ships of the line ,
234 or
235 .Em line of battle ships .
236 These were so named because in fleet actions they would sail in lines
237 so as to present all broadsides to the enemy at once.
238 .\" ... to sail close enough for mutual support.
239 The modern terms
240 .Dq ocean liner ,
241 and
242 .Dq battleship
243 are derived from
244 .Dq ship of the line .
245 .Pp
246 The pride of the fleet were the
247 .Dq first-rates .
248 These were huge three decked ships of the line mounting 80 to 136 guns.
249 The guns in the three tiers
250 were usually 18, 24, and 32 pounders in that order from top to bottom.
251 .Pp
252 Lesser ships were known as
253 .Dq second-rates ,
254 .Dq third-rates ,
255 and even
256 .Dq fourth-rates .
257 The most common size was the 74 gun two-decked ship of the line.
258 The two gun decks usually mounted 18 and 24 pounder guns.
259 .Pp
260 .Em Razees
261 were ships of the line with one deck sawed off.
262 These mounted 40-64 guns and were
263 a poor cross between a frigate and a line of battle ship.
264 They neither had the speed of the former nor the firepower of the latter.
265 .Pp
266 The next class was the
267 .Em frigate .
268 Often called the
269 .Dq eyes of the fleet ,
270 frigates came in many sizes mounting anywhere from 32 to 44 guns.
271 These were very handy vessels.
272 They could outsail anything bigger and outshoot anything smaller.
273 Frigates did not generally fight in lines of battle as the much bigger
274 74s did.
275 Instead, they were sent on individual missions or in small groups to
276 harass the enemy's rear or capture crippled ships.
277 .\" cutting out expeditions or boat actions.
278 They were much more useful this way, in missions away from the fleet.
279 They could hit hard and get away fast.
280 .Pp
281 Lastly, there were the corvettes, sloops, and brigs.
282 These were smaller ships mounting typically fewer than 20 guns.
283 A corvette was only slightly
284 smaller than a frigate, so one might have up to 30 guns.
285 Sloops were used for carrying despatches or passengers.
286 Brigs were small vessels typically built for land-locked lakes.
287 .Sh SAIL PARTICULARS
288 Ships in
289 .Nm
290 are represented on the screen by two characters.
291 One character represents the bow of
292 the ship, and the other represents the stern.
293 Ships have nationalities and numbers.
294 The first ship of a nationality is number 0, the second
295 number 1, etc.
296 Therefore, the first British ship in a game would be printed as
297 .Dq b0 .
298 The second Brit would be
299 .Dq b1 ,
300 and the fifth Don would be
301 .Dq s4 .
302 .Pp
303 Ships can set normal sails, called
304 .Em Battle Sails ,
305 or bend on extra canvas called
306 .Em Full Sails .
307 A ship under full sail is a beautiful sight indeed,
308 and it can move much faster than a ship under battle sails.
309 The only trouble is, with full sails set, there is so much tension on sail and
310 rigging that a well aimed round shot can burst a sail into ribbons where
311 it would only cause a little hole in a loose sail.
312 For this reason, rigging damage is doubled on a ship with full sails set.
313 This does not mean that full sails should never be used; the author
314 recommends keeping them up right into the heat of battle.
315 When a ship has full sails set, the letter for its nationality is
316 capitalized.
317 E.g., a Frog,
318 .Dq f0 ,
319 with full sails set would be printed as
320 .Dq F0 .
321 .Pp
322 When a ship is battered into a listing hulk, the last man aboard
323 .Em strikes the colors .
324 This ceremony is the ship's formal surrender.
325 The nationality character of a surrendered ship is printed as
326 .So
327 !
328 .Sc .
329 E.g., the Frog of our last example would soon be
330 .Dq !0 .
331 .Pp
332 A ship that reaches this point has a chance of catching fire or sinking.
333 A sinking ship has a
334 .Sq ~
335 printed for its nationality,
336 and a ship on fire and about to explode has a
337 .Sq #
338 printed.
339 .Pp
340 Ships that have struck can be captured;
341 captured ships become the nationality of the prize crew.
342 Therefore, if
343 an American ship captures a British ship, the British ship will
344 thenceforth have an
345 .Sq a
346 printed for its nationality.
347 In addition, the ship number is changed
348 to one of the characters
349 .So
350 \*[Am]'()*+
351 .Sc
352 corresponding to its original number
353 .So
354 012345
355 .Sc .
356 E.g., the
357 .Dq b0
358 captured by an American becomes the
359 .Dq a\*[Am] .
360 The
361 .Dq s4
362 captured by a Frog becomes the
363 .Dq f* .
364 .Pp
365 The ultimate example is, of course, an exploding Brit captured by an
366 American:
367 .Dq #\*[Am] .
368 .Sh MOVEMENT
369 Movement is the most confusing part of
370 .Nm
371 to many.
372 Ships can head in 8 directions:
373 .Bd -literal -offset indent
374                          0      0      0
375 b       b       b0      b       b       b       0b      b
376 0        0                                             0
377
378 .Ed
379 The stern of a ship moves when it turns.
380 The bow remains stationary.
381 Ships can always turn, regardless of the wind (unless they are becalmed).
382 All ships drift when they lose headway.
383 If a ship doesn't move forward at all for two turns, it will begin to drift.
384 If a ship has begun to
385 drift, then it must move forward before it turns, if it plans to do
386 more than make a right or left turn, which is always possible.
387 .Pp
388 Movement commands to
389 .Nm
390 are a string of forward moves and turns.
391 An example is
392 .Dq l3 .
393 It will turn a ship left and then move it ahead 3 spaces.
394 In the drawing above, the
395 .Dq b0
396 made 7 successive left turns.
397 When
398 .Nm
399 prompts you for a move, it prints three characters of import.
400 E.g.,
401 .Dl move (7, 4):
402 The first number is the maximum number of moves you can make, including turns.
403 The second number is the maximum number of turns you can make.
404 Between the numbers is sometimes printed a quote
405 .Pq ' .
406 If the quote is present, it means that your ship has been drifting, and
407 you must move ahead to regain headway before you turn (see note above).
408 Some of the possible moves for the example above are as follows:
409 .Bd -literal -offset indent
410 move (7, 4): 7
411 move (7, 4): 1
412 move (7, 4): d          /* drift, or do nothing */
413 move (7, 4): 6r
414 move (7, 4): 5r1
415 move (7, 4): 4r1r
416 move (7, 4): l1r1r2
417 move (7, 4): 1r1r1r1
418 .Ed
419 .Pp
420 Because square riggers performed so poorly sailing into the wind, if at
421 any point in a movement command you turn into the wind, the movement stops
422 there.
423 E.g.,
424 .Bd -literal -offset indent
425 move (7, 4): l1l4
426 Movement Error;
427 Helm: l1l
428
429 .Ed
430 Moreover, upon making a turn, the movement allowance drops to the
431 lesser of what remains this turn and what would be available when
432 going in the new direction.
433 Thus, any turn closer to the wind will generally preclude sailing the
434 full distance printed in the
435 .Dq move
436 prompt.
437 .Pp
438 Old sailing captains had to keep an eye constantly on the wind.
439 Captains in
440 .Nm
441 are no different.
442 A ship's ability to move depends on its attitude to the wind.
443 The best angle possible is to have the wind off your quarter, that is,
444 just off the stern.
445 The direction rose on the side of the screen gives the
446 possible movements for your ship at all positions to the wind.
447 Battle
448 sail speeds are given first, and full sail speeds are given in parenthesis.
449 .Bd -literal
450
451                                  0 1(2)
452                                 \\|/
453                                 -^-3(6)
454                                 /|\\
455                                  | 4(7)
456                                 3(6)
457
458 .Ed
459 Pretend the bow of your ship
460 .Pq the Dq ^
461 is pointing upward and the wind is
462 blowing from the bottom to the top of the page.
463 The numbers at the bottom
464 .Dq 3(6)
465 will be your speed under battle or full
466 sails in such a situation.
467 If the wind is off your quarter, then you can move
468 .Dq 4(7) .
469 If the wind is off your beam,
470 .Dq 3(6) .
471 If the wind is off your bow, then you can only move
472 .Dq 1(2) .
473 Facing into the wind, you cannot move at all.
474 Ships facing into the wind are said to be
475 .Em in irons .
476 .Sh WINDSPEED AND DIRECTION
477 The windspeed and direction is displayed as a weather vane on the
478 side of the screen.
479 The number in the middle of the vane indicates the wind
480 speed, and the + to - indicates the wind direction.
481 The wind blows from the + sign (high pressure) to the - sign (low pressure).
482 E.g.,
483 .Bd -literal
484                                 |
485                                 3
486                                 +
487 .Ed
488 .Pp
489 The wind speeds are:
490 .Bl -tag -width 012 -compact -offset indent
491 .It 0
492 becalmed
493 .It 1
494 light breeze
495 .It 2
496 moderate breeze
497 .It 3
498 fresh breeze
499 .It 4
500 strong breeze
501 .It 5
502 gale
503 .It 6
504 full gale
505 .It 7
506 hurricane
507 .El
508 If a hurricane shows up, all ships are destroyed.
509 .Sh GRAPPLING AND FOULING
510 If two ships collide, they run the risk of becoming tangled together.
511 This is called
512 .Em fouling .
513 Fouled ships are stuck together, and neither can move.
514 They can unfoul each other if they want to.
515 Boarding parties can only be
516 sent across to ships when the antagonists are either fouled or grappled.
517 .Pp
518 Ships can grapple each other by throwing grapnels into the rigging of
519 the other.
520 .Pp
521 The number of fouls and grapples you have are displayed on the upper
522 right of the screen.
523 .Sh BOARDING
524 Boarding was a very costly venture in terms of human life.
525 Boarding parties may be formed in
526 .Nm
527 to either board an enemy ship or to defend your own ship against attack.
528 Men organized as Defensive Boarding Parties fight twice as hard to save
529 their ship as men left unorganized.
530 .Pp
531 The boarding strength of a crew depends upon its quality and upon the
532 number of men sent.
533 .Sh CREW QUALITY
534 The British seaman was world renowned for his sailing abilities.
535 American sailors, however, were actually the best seamen in the world.
536 Because the
537 American Navy offered twice the wages of the Royal Navy, British seamen
538 who liked the sea defected to America by the thousands.
539 .Pp
540 In
541 .Nm ,
542 crew quality is quantized into 5 energy levels.
543 .Em Elite
544 crews can outshoot and outfight all other sailors.
545 .Em Crack
546 crews are next.
547 .Em Mundane
548 crews are average, and
549 .Em Green
550 and
551 .Em Mutinous
552 crews are below average.
553 A good rule of thumb is that
554 .Em Crack
555 or
556 .Em Elite
557 crews get one extra hit
558 per broadside compared to
559 .Em Mundane
560 crews.
561 Don't expect too much from
562 .Em Green
563 crews.
564 .Sh BROADSIDES
565 Your two broadsides may be loaded with four kinds of shot: grape, chain,
566 round, and double.
567 You have guns and carronades in both the port and starboard batteries.
568 Carronades only have a range of two, so you have to get in
569 close to be able to fire them.
570 You have the choice of firing at the hull or rigging of another ship.
571 If the range of the ship is greater than 6,
572 then you may only shoot at the rigging.
573 .Pp
574 The types of shot and their advantages are:
575 .Bl -tag -width DOUBLEx
576 .It ROUND
577 Range of 10.
578 Good for hull or rigging hits.
579 .It DOUBLE
580 Range of 1.
581 Extra good for hull or rigging hits.
582 Double takes two turns to load.
583 .It CHAIN
584 Range of 3.
585 Excellent for tearing down rigging.
586 Cannot damage hull or guns, though.
587 .It GRAPE
588 Range of 1.
589 Sometimes devastating against enemy crews.
590 .El
591 .Pp
592 On the side of the screen is displayed some vital information about your
593 ship:
594 .Bd -literal -offset indent
595 Load  D! R!
596 Hull  9
597 Crew  4  4  2
598 Guns  4  4
599 Carr  2  2
600 Rigg  5 5 5 5
601
602 .Ed
603 .Dq Load
604 shows what your port
605 .Pq left
606 and starboard
607 .Pq right
608 broadsides are
609 loaded with.
610 A
611 .So
612 !
613 .Sc
614 after the type of shot indicates that it is an initial broadside.
615 Initial broadside were loaded with care before battle and before
616 the decks ran red with blood.
617 As a consequence, initial broadsides are a
618 little more effective than broadsides loaded later.
619 A
620 .Sq *
621 after the type of shot indicates that the gun
622 crews are still loading it, and you cannot fire yet.
623 .Dq Hull
624 shows how much hull you have left.
625 .Dq Crew
626 shows your three sections of crew.
627 As your crew dies off, your ability to fire decreases.
628 .Dq Guns
629 and
630 .Dq Carr
631 show your port and starboard guns.
632 As you lose guns, your ability to fire decreases.
633 .Dq Rigg
634 shows how much rigging you have on your 3 or 4 masts.
635 As rigging is shot away, you lose mobility.
636 .Sh EFFECTIVENESS OF FIRE
637 It is very dramatic when a ship fires its thunderous broadsides, but the
638 mere opportunity to fire them does not guarantee any hits.
639 Many factors influence the destructive force of a broadside.
640 First of all, and the chief factor, is distance.
641 It is harder to hit a ship at range ten than it is
642 to hit one sloshing alongside.
643 Next is raking.
644 Raking fire, as mentioned before, can sometimes dismast a ship at range ten.
645 Next, crew size and quality affects the damage done by a broadside.
646 The number of guns firing also bears on the point, so to speak.
647 Lastly, weather affects the accuracy of a broadside.
648 If the seas are high (5 or 6), then the lower gunports
649 of ships of the line can't even be opened to run out the guns.
650 This gives frigates and other flush decked vessels an advantage in a storm.
651 The scenario
652 .Em Pellew vs. The Droits de L'Homme
653 takes advantage of this peculiar circumstance.
654 .Sh REPAIRS
655 Repairs may be made to your Hull, Guns, and Rigging at the slow rate of
656 two points per three turns.
657 The message "Repairs Completed" will be printed if no more repairs can be made.
658 .Sh PECULIARITIES OF COMPUTER SHIPS
659 Computer ships in
660 .Nm
661 follow all the rules above with a few exceptions.
662 Computer ships never repair damage.
663 If they did, the players could never beat them.
664 They play well enough as it is.
665 As a consolation, the computer ships can fire double shot every turn.
666 That fluke is a good reason to keep your distance.
667 The driver figures out the moves of the computer ships.
668 It computes them with a typical A.I. distance
669 function and a depth first search to find the maximum
670 .Dq score .
671 It seems to work fairly well, although I'll be the first to admit it isn't
672 perfect.
673 .Sh HOW TO PLAY
674 Commands are given to
675 .Nm
676 by typing a single character.
677 You will then be prompted for further input.
678 A brief summary of the commands follows.
679 .Ss COMMAND SUMMARY
680 .Bl -tag -width xD,xNxx -compact
681 .It Sq f
682 Fire broadsides if they bear
683 .It Sq l
684 Reload
685 .It Sq L
686 Unload broadsides (to change ammo)
687 .It Sq m
688 Move
689 .It Sq i
690 Print the closest ship
691 .It Sq I
692 Print all ships
693 .It Sq F
694 Find a particular ship or ships (e.g. "a?" for all Americans)
695 .It Sq s
696 Send a message around the fleet
697 .It Sq b
698 Attempt to board an enemy ship
699 .It Sq B
700 Recall boarding parties
701 .It Sq c
702 Change set of sail
703 .It Sq r
704 Repair
705 .It Sq u
706 Attempt to unfoul
707 .It Sq g
708 Grapple/ungrapple
709 .It Sq v
710 Print version number of game
711 .It Sq ^L
712 Redraw screen
713 .It Sq Q
714 Quit
715 .Pp
716 .It Sq C
717 Center your ship in the window
718 .It Sq U
719 Move window up
720 .It Sq D, N
721 Move window down
722 .It Sq H
723 Move window left
724 .It Sq J
725 Move window right
726 .It Sq S
727 Toggle window to follow your ship or stay where it is
728 .El
729 .Sh SCENARIOS
730 Here is a summary of the scenarios in
731 .Nm :
732 .Ss Ranger vs. Drake :
733 Wind from the N, blowing a fresh breeze.
734 .Bd -literal
735 (a) Ranger            19 gun Sloop (crack crew) (7 pts)
736 (b) Drake             17 gun Sloop (crack crew) (6 pts)
737 .Ed
738 .Ss The Battle of Flamborough Head :
739 Wind from the S, blowing a fresh breeze.
740 .Pp
741 This is John Paul Jones' first famous battle.
742 Aboard the
743 .Em Bonhomme Richard ,
744 he was able to overcome the
745 .Em Serapis's
746 greater firepower
747 by quickly boarding her.
748 .Bd -literal
749 (a) Bonhomme Rich     42 gun Corvette (crack crew) (11 pts)
750 (b) Serapis           44 gun Frigate (crack crew) (12 pts)
751 .Ed
752 .Ss Arbuthnot and Des Touches :
753 Wind from the N, blowing a gale.
754 .Bd -literal
755 (b) America           64 gun Ship of the Line (crack crew) (20 pts)
756 (b) Befford           74 gun Ship of the Line (crack crew) (26 pts)
757 (b) Adamant           50 gun Ship of the Line (crack crew) (17 pts)
758 (b) London            98 gun 3 Decker SOL (crack crew) (28 pts)
759 (b) Royal Oak         74 gun Ship of the Line (crack crew) (26 pts)
760 (f) Neptune           74 gun Ship of the Line (average crew) (24 pts)
761 (f) Duc de Bourgogne  80 gun 3 Decker SOL (average crew) (27 pts)
762 (f) Conquerant        74 gun Ship of the Line (average crew) (24 pts)
763 (f) Provence          64 gun Ship of the Line (average crew) (18 pts)
764 (f) Romulus           44 gun Ship of the Line (average crew) (10 pts)
765 .Ed
766 .Ss Suffren and Hughes :
767 Wind from the S, blowing a fresh breeze.
768 .Bd -literal
769 (b) Monmouth          74 gun Ship of the Line (average crew) (24 pts)
770 (b) Hero              74 gun Ship of the Line (crack crew) (26 pts)
771 (b) Isis              50 gun Ship of the Line (crack crew) (17 pts)
772 (b) Superb            74 gun Ship of the Line (crack crew) (27 pts)
773 (b) Burford           74 gun Ship of the Line (average crew) (24 pts)
774 (f) Flamband          50 gun Ship of the Line (average crew) (14 pts)
775 (f) Annibal           74 gun Ship of the Line (average crew) (24 pts)
776 (f) Severe            64 gun Ship of the Line (average crew) (18 pts)
777 (f) Brilliant         80 gun Ship of the Line (crack crew) (31 pts)
778 (f) Sphinx            80 gun Ship of the Line (average crew) (27 pts)
779 .Ed
780 .Ss Nymphe vs. Cleopatre :
781 Wind from the S, blowing a fresh breeze.
782 .Bd -literal
783 (b) Nymphe            36 gun Frigate (crack crew) (11 pts)
784 (f) Cleopatre         36 gun Frigate (average crew) (10 pts)
785 .Ed
786 .Ss Mars vs. Hercule :
787 Wind from the S, blowing a fresh breeze.
788 .Bd -literal
789 (b) Mars              74 gun Ship of the Line (crack crew) (26 pts)
790 (f) Hercule           74 gun Ship of the Line (average crew) (23 pts)
791 .Ed
792 .Ss Ambuscade vs. Baionnaise :
793 Wind from the N, blowing a fresh breeze.
794 .Bd -literal
795 (b) Ambuscade         32 gun Frigate (average crew) (9 pts)
796 (f) Baionnaise        24 gun Corvette (average crew) (9 pts)
797 .Ed
798 .Ss Constellation vs. Insurgent :
799 Wind from the S, blowing a gale.
800 .Bd -literal
801 (a) Constellation     38 gun Corvette (elite crew) (17 pts)
802 (f) Insurgent         36 gun Corvette (average crew) (11 pts)
803 .Ed
804 .Ss Constellation vs. Vengeance :
805 Wind from the S, blowing a fresh breeze.
806 .Bd -literal
807 (a) Constellation     38 gun Corvette (elite crew) (17 pts)
808 (f) Vengeance         40 gun Frigate (average crew) (15 pts)
809 .Ed
810 .Ss The Battle of Lissa :
811 Wind from the S, blowing a fresh breeze.
812 .Bd -literal
813 (b) Amphion           32 gun Frigate (elite crew) (13 pts)
814 (b) Active            38 gun Frigate (elite crew) (18 pts)
815 (b) Volage            22 gun Frigate (elite crew) (11 pts)
816 (b) Cerberus          32 gun Frigate (elite crew) (13 pts)
817 (f) Favorite          40 gun Frigate (average crew) (15 pts)
818 (f) Flore             40 gun Frigate (average crew) (15 pts)
819 (f) Danae             40 gun Frigate (crack crew) (17 pts)
820 (f) Bellona           32 gun Frigate (green crew) (9 pts)
821 (f) Corona            40 gun Frigate (green crew) (12 pts)
822 (f) Carolina          32 gun Frigate (green crew) (7 pts)
823 .Ed
824 .Ss Constitution vs. Guerriere :
825 Wind from the SW, blowing a gale.
826 .Bd -literal
827 (a) Constitution      44 gun Corvette (elite crew) (24 pts)
828 (b) Guerriere         38 gun Frigate (crack crew) (15 pts)
829 .Ed
830 .Ss United States vs. Macedonian :
831 Wind from the S, blowing a fresh breeze.
832 .Bd -literal
833 (a) United States     44 gun Frigate (elite crew) (24 pts)
834 (b) Macedonian        38 gun Frigate (crack crew) (16 pts)
835 .Ed
836 .Ss Constitution vs. Java :
837 Wind from the S, blowing a fresh breeze.
838 .Bd -literal
839 (a) Constitution      44 gun Corvette (elite crew) (24 pts)
840 (b) Java              38 gun Corvette (crack crew) (19 pts)
841 .Ed
842 .Ss Chesapeake vs. Shannon :
843 Wind from the S, blowing a fresh breeze.
844 .Bd -literal
845 (a) Chesapeake        38 gun Frigate (average crew) (14 pts)
846 (b) Shannon           38 gun Frigate (elite crew) (17 pts)
847 .Ed
848 .Ss The Battle of Lake Erie :
849 Wind from the S, blowing a light breeze.
850 .Bd -literal
851 (a) Lawrence          20 gun Sloop (crack crew) (9 pts)
852 (a) Niagara           20 gun Sloop (elite crew) (12 pts)
853 (b) Lady Prevost      13 gun Brig (crack crew) (5 pts)
854 (b) Detroit           19 gun Sloop (crack crew) (7 pts)
855 (b) Q. Charlotte      17 gun Sloop (crack crew) (6 pts)
856 .Ed
857 .Ss Wasp vs. Reindeer :
858 Wind from the S, blowing a light breeze.
859 .Bd -literal
860 (a) Wasp              20 gun Sloop (elite crew) (12 pts)
861 (b) Reindeer          18 gun Sloop (elite crew) (9 pts)
862 .Ed
863 .Ss Constitution vs. Cyane and Levant :
864 Wind from the S, blowing a moderate breeze.
865 .Bd -literal
866 (a) Constitution      44 gun Corvette (elite crew) (24 pts)
867 (b) Cyane             24 gun Sloop (crack crew) (11 pts)
868 (b) Levant            20 gun Sloop (crack crew) (10 pts)
869 .Ed
870 .Ss Pellew vs. Droits de L'Homme :
871 Wind from the N, blowing a gale.
872 .Bd -literal
873 (b) Indefatigable     44 gun Frigate (elite crew) (14 pts)
874 (b) Amazon            36 gun Frigate (crack crew) (14 pts)
875 (f) Droits L'Hom      74 gun Ship of the Line (average crew) (24 pts)
876 .Ed
877 .Ss Algeciras :
878 Wind from the SW, blowing a moderate breeze.
879 .Bd -literal
880 (b) Caesar            80 gun Ship of the Line (crack crew) (31 pts)
881 (b) Pompee            74 gun Ship of the Line (crack crew) (27 pts)
882 (b) Spencer           74 gun Ship of the Line (crack crew) (26 pts)
883 (b) Hannibal          98 gun 3 Decker SOL (crack crew) (28 pts)
884 (s) Real-Carlos       112 gun 3 Decker SOL (green crew) (27 pts)
885 (s) San Fernando      96 gun 3 Decker SOL (green crew) (24 pts)
886 (s) Argonauta         80 gun Ship of the Line (green crew) (23 pts)
887 (s) San Augustine     74 gun Ship of the Line (green crew) (20 pts)
888 (f) Indomptable       80 gun Ship of the Line (average crew) (27 pts)
889 (f) Desaix            74 gun Ship of the Line (average crew) (24 pts)
890 .Ed
891 .Ss Lake Champlain :
892 Wind from the N, blowing a fresh breeze.
893 .Bd -literal
894 (a) Saratoga          26 gun Sloop (crack crew) (12 pts)
895 (a) Eagle             20 gun Sloop (crack crew) (11 pts)
896 (a) Ticonderoga       17 gun Sloop (crack crew) (9 pts)
897 (a) Preble            7 gun Brig (crack crew) (4 pts)
898 (b) Confiance         37 gun Frigate (crack crew) (14 pts)
899 (b) Linnet            16 gun Sloop (elite crew) (10 pts)
900 (b) Chubb             11 gun Brig (crack crew) (5 pts)
901 .Ed
902 .Ss Last Voyage of the USS President :
903 Wind from the N, blowing a fresh breeze.
904 .Bd -literal
905 (a) President         44 gun Frigate (elite crew) (24 pts)
906 (b) Endymion          40 gun Frigate (crack crew) (17 pts)
907 (b) Pomone            44 gun Frigate (crack crew) (20 pts)
908 (b) Tenedos           38 gun Frigate (crack crew) (15 pts)
909 .Ed
910 .Ss Hornblower and the Natividad :
911 Wind from the E, blowing a gale.
912 .Pp
913 A scenario for you Horny fans.
914 Remember, he sank the Natividad against heavy odds and winds.
915 Hint: don't try to board the Natividad;
916 her crew is much bigger, albeit green.
917 .Bd -literal
918 (b) Lydia             36 gun Frigate (elite crew) (13 pts)
919 (s) Natividad         50 gun Ship of the Line (green crew) (14 pts)
920 .Ed
921 .Ss Curse of the Flying Dutchman :
922 Wind from the S, blowing a fresh breeze.
923 .Pp
924 Just for fun, take the Piece of cake.
925 .Bd -literal
926 (s) Piece of Cake     24 gun Corvette (average crew) (9 pts)
927 (f) Flying Dutchy     120 gun 3 Decker SOL (elite crew) (43 pts)
928 .Ed
929 .Ss The South Pacific :
930 Wind from the S, blowing a strong breeze.
931 .Bd -literal
932 (a) USS Scurvy        136 gun 3 Decker SOL (mutinous crew) (27 pts)
933 (b) HMS Tahiti        120 gun 3 Decker SOL (elite crew) (43 pts)
934 (s) Australian        32 gun Frigate (average crew) (9 pts)
935 (f) Bikini Atoll      7 gun Brig (crack crew) (4 pts)
936 .Ed
937 .Ss Hornblower and the battle of Rosas bay :
938 Wind from the E, blowing a fresh breeze.
939 .Pp
940 The only battle Hornblower ever lost.
941 He was able to dismast one ship and stern rake the others though.
942 See if you can do as well.
943 .Bd -literal
944 (b) Sutherland        74 gun Ship of the Line (crack crew) (26 pts)
945 (f) Turenne           80 gun 3 Decker SOL (average crew) (27 pts)
946 (f) Nightmare         74 gun Ship of the Line (average crew) (24 pts)
947 (f) Paris             112 gun 3 Decker SOL (green crew) (27 pts)
948 (f) Napoleon          74 gun Ship of the Line (green crew) (20 pts)
949 .Ed
950 .Ss Cape Horn :
951 Wind from the NE, blowing a strong breeze.
952 .Bd -literal
953 (a) Concord           80 gun Ship of the Line (average crew) (27 pts)
954 (a) Berkeley          98 gun 3 Decker SOL (crack crew) (28 pts)
955 (b) Thames            120 gun 3 Decker SOL (elite crew) (43 pts)
956 (s) Madrid            112 gun 3 Decker SOL (green crew) (27 pts)
957 (f) Musket            80 gun 3 Decker SOL (average crew) (27 pts)
958 .Ed
959 .Ss New Orleans :
960 Wind from the SE, blowing a fresh breeze.
961 .Pp
962 Watch that little Cypress go!
963 .Bd -literal
964 (a) Alligator         120 gun 3 Decker SOL (elite crew) (43 pts)
965 (b) Firefly           74 gun Ship of the Line (crack crew) (27 pts)
966 (b) Cypress           44 gun Frigate (elite crew) (14 pts)
967 .Ed
968 .Ss Botany Bay :
969 Wind from the N, blowing a fresh breeze.
970 .Bd -literal
971 (b) Shark             64 gun Ship of the Line (average crew) (18 pts)
972 (f) Coral Snake       44 gun Corvette (elite crew) (24 pts)
973 (f) Sea Lion          44 gun Frigate (elite crew) (24 pts)
974 .Ed
975 .Ss Voyage to the Bottom of the Sea :
976 Wind from the NW, blowing a fresh breeze.
977 .Pp
978 This one is dedicated to Richard Basehart and David Hedison.
979 .Bd -literal
980 (a) Seaview           120 gun 3 Decker SOL (elite crew) (43 pts)
981 (a) Flying Sub        40 gun Frigate (crack crew) (17 pts)
982 (b) Mermaid           136 gun 3 Decker SOL (mutinous crew) (27 pts)
983 (s) Giant Squid       112 gun 3 Decker SOL (green crew) (27 pts)
984 .Ed
985 .Ss Frigate Action :
986 Wind from the E, blowing a fresh breeze.
987 .Bd -literal
988 (a) Killdeer          40 gun Frigate (average crew) (15 pts)
989 (b) Sandpiper         40 gun Frigate (average crew) (15 pts)
990 (s) Curlew            38 gun Frigate (crack crew) (16 pts)
991 .Ed
992 .Ss The Battle of Midway :
993 Wind from the E, blowing a moderate breeze.
994 .Bd -literal
995 (a) Enterprise        80 gun Ship of the Line (crack crew) (31 pts)
996 (a) Yorktown          80 gun Ship of the Line (average crew) (27 pts)
997 (a) Hornet            74 gun Ship of the Line (average crew) (24 pts)
998 (j) Akagi             112 gun 3 Decker SOL (green crew) (27 pts)
999 (j) Kaga              96 gun 3 Decker SOL (green crew) (24 pts)
1000 (j) Soryu             80 gun Ship of the Line (green crew) (23 pts)
1001 .Ed
1002 .Ss Star Trek :
1003 Wind from the S, blowing a fresh breeze.
1004 .Bd -literal
1005 (a) Enterprise        450 gun Ship of the Line (elite crew) (75 pts)
1006 (a) Yorktown          450 gun Ship of the Line (elite crew) (75 pts)
1007 (a) Reliant           450 gun Ship of the Line (elite crew) (75 pts)
1008 (a) Galileo           450 gun Ship of the Line (elite crew) (75 pts)
1009 (k) Kobayashi Maru    450 gun Ship of the Line (elite crew) (75 pts)
1010 (k) Klingon II        450 gun Ship of the Line (elite crew) (75 pts)
1011 (o) Red Orion         450 gun Ship of the Line (elite crew) (75 pts)
1012 (o) Blue Orion        450 gun Ship of the Line (elite crew) (75 pts)
1013 .Ed
1014 .Sh HISTORY
1015 Dave Riggle wrote the first version of
1016 .Nm
1017 on a PDP\-11/70 in the fall of 1980.
1018 Needless to say, the code was horrendous,
1019 not portable in any sense of the word, and didn't work.
1020 The program was not
1021 very modular and had
1022 .Xr fseek 3
1023 and
1024 .Xr fwrite 3
1025 calls every few lines.
1026 After a tremendous rewrite from the top down,
1027 the first working version was up and running by 1981.
1028 There were several annoying bugs concerning firing broadsides and
1029 finding angles.
1030 .\" No longer true...
1031 .\" .Nm
1032 .\" uses no floating point, by the way, so the direction routines are rather
1033 .\" tricky.
1034 .Pp
1035 Ed Wang rewrote the
1036 .Fn angle
1037 routine in 1981 to be more correct.
1038 He also added code to let a player select
1039 which ship he wanted at the start of the game, instead of always
1040 taking the first one available.
1041 .Pp
1042 Captain Happy (Craig Leres) is responsible for making
1043 .Nm
1044 portable for the first time.
1045 This was no easy task.
1046 Constants like 2 and 10 were very frequent in the code.
1047 The
1048 .Nm
1049 code was also notorious for the use of
1050 .Dq Riggle Memorial Structures .
1051 Many structure references were so long that they ran off the line
1052 printer page.
1053 Here is an example, if you promise not to laugh:
1054 .Bd -literal -offset indent
1055 specs[scene[flog.fgamenum].ship[flog.fshipnum].shipnum].pts
1056 .Ed
1057 .Pp
1058 .Nm
1059 received its fourth and most thorough rewrite in the summer and fall
1060 of 1983.
1061 Ed Wang rewrote and modularized the code (a monumental feat)
1062 almost from scratch.
1063 Although he introduced many new bugs, the final result was very much
1064 cleaner and (?) faster.
1065 He added window movement commands and find ship commands.
1066 .Pp
1067 At some currently unknown time,
1068 .Nm
1069 was imported into
1070 .Bx .
1071 .Sh AUTHORS
1072 .Nm
1073 has been a group effort.
1074 .Ss AUTHOR
1075 Dave Riggle
1076 .Ss CO-AUTHOR
1077 Ed Wang
1078 .Ss REFITTING
1079 Craig Leres
1080 .Ss CONSULTANTS
1081 .Bl -item -compact
1082 .It
1083 Chris Guthrie
1084 .It
1085 Captain Happy
1086 .It
1087 Horatio Nelson
1088 .El
1089 and many valiant others...
1090 .Sh REFERENCES
1091 .Rs
1092 .%B Wooden Ships \*[Am] Iron Men
1093 .%A "Avalon Hill"
1094 .Re
1095 .Pp
1096 .Rs
1097 .%B Master and Commander
1098 .%O and 20 more volumes
1099 .%A Patrick O'Brian
1100 .Re
1101 .Pp
1102 .Rs
1103 .%B Captain Horatio Hornblower Novels
1104 .%O "(13 of them)"
1105 .%A "C.S. Forester"
1106 .Re
1107 .Pp
1108 .Rs
1109 .%B Captain Richard Bolitho Novels
1110 .%O "(12 of them)"
1111 .%A "Alexander Kent"
1112 .Re
1113 .Pp
1114 .Rs
1115 .%B The Complete Works of Captain Frederick Marryat
1116 .%O "(about 20)"
1117 .Re
1118 .Pp
1119 Of these, consider especially
1120 .Bl -item -offset indent -compact
1121 .It
1122 .%B Mr. Midshipman Easy
1123 .It
1124 .%B Peter Simple
1125 .It
1126 .%B Jacob Faithful
1127 .It
1128 .%B Japhet in Search of a Father
1129 .It
1130 .%B Snarleyyow, or The Dog Fiend
1131 .It
1132 .%B Frank Mildmay, or The Naval Officer
1133 .El
1134 .\" .Sh BUGS
1135 .\" Probably a few, and please report them to "riggle@ernie.berkeley.edu" and
1136 .\" "edward@ucbarpa.berkeley.edu".