📄 ch65.htm
字号:
<P>Of course, sometimes you miscalculate and blow up. To restart the game, click
with either mouse button in the Score window. If you complete the game successfully,
your time will be recorded.
<H4 ALIGN="CENTER"><A NAME="Heading25<FONT COLOR="#000077">Xpaint</FONT></H4>
<P>This is a color drawing-and-painting program. Start it from the Linux prompt in
a command-line window by typing <TT>xpaint</TT>. A Tool menu will appear. Start a
new canvas from the File menu. The Tool menu holds your drawing and painting implements
(brushes, pencils, spray cans, and so on); the palette of colors and patterns is
found underneath the canvas.</P>
<P>To see the man page, type <TT>man xpaint</TT>.
<H4 ALIGN="CENTER"><A NAME="Heading26<FONT COLOR="#000077">Xfractint</FONT></H4>
<P>Xfractint is an easy way to get started with fractals. If you're not sure what
a fractal is, try this program. It's almost certain that you've seen fractals before.</P>
<P>To see this game's man page, type <TT>man xfractint</TT>.</P>
<P>To start this game, type <TT>xfractint</TT> in a command-line window.</P>
<P>This program has an excellent setup; you can immediately generate many different
fractals without getting into their detailed specifications or mathematics.</P>
<P>When you start Xfractint, two windows appear: one that will hold the fractal image
(initially empty), and another in which you enter your commands. You can go into
the Type selection and choose the type of fractal to generate; or you can click on
Select video mode, which starts drawing a fractal in the image window. The default
fractal is one of the Mandelbrot types.</P>
<P>When the image has been fully generated (it can take some time), you can go to
the command window, type <TT>t</TT>, and select another type of fractal from the
large list of available choices. At this point, you shouldn't have to change the
defaults the program gives you. There are enough different types available.</P>
<P>To exit Xfractint, press the Esc key twice from the command window.
<H3 ALIGN="CENTER"><A NAME="Heading27<FONT COLOR="#000077">Character-Based
Games</FONT></H3>
<P>There is a long history of games being written for the UNIX operating system.
Your Linux <TT>/usr/games</TT> directory contains a number of these games, from various
time periods.</P>
<P>Many of these games were written before color, bitmapped windowing systems became
common. All the games in <TT>/usr/games</TT>, except for Sasteroids, are character-based.
This means that all graphics (if there are any!) are displayed on your screen using
standard screen characters: <TT>A</TT>, <TT>*</TT>, <TT>|</TT>, <TT>x</TT>, and so
on. In addition, all input is from the keyboard (again, Sasteroids is an exception).</P>
<P>An advantage of character-based games is that they do not require a graphical
or windowing environment to run. A monochrome display is fine.</P>
<P>The character-based nature of some games, such as Hangman or Bog (Boggle), takes
nothing away from the play; you don't really wish for fancy color graphics when playing
them. Other character-based games might strike you as interesting historical curiosities:
they show you what their ingenious programmers could manage with such a simple display
system, but clearly would be better served by color graphics.
<H4 ALIGN="CENTER"><A NAME="Heading28<FONT COLOR="#000077">A Summary of Games
in /usr/games</FONT></H4>
<P>The games found in <TT>/usr/games</TT> can be roughly categorized into the following
types:
<UL>
<LI>Text adventure: Battlestar; Dungeon; Paranoia; Wump
<P>
<LI>Word games: Bog (Boggle); Hangman
<P>
<LI>Card games: Canfield; Cribbage; Go Fish
<P>
<LI>Board games: Backgammon and Teachgammon; GNU Chess; Mille Miglia; Monop (Monopoly)
<P>
<LI>Simulations: ATC (air traffic control); Sail; Trek
<P>
<LI>Character-based "video" games: Robots, Snake, Tetris, Worm
<P>
<LI>Math games/utilities: arithmetic; bcd, Morse, and ppt; Factor; Primes
<P>
<LI>Multiplayer games: Hunt
<P>
<LI>Full graphics games: Sasteroids
<P>
<LI>Miscellaneous demos and utilities: Caesar; Fortune; Number; Pom; Rain; and Worms
</UL>
<DL>
<DT></DT>
</DL>
<DL>
<DD>
<HR>
<A NAME="Heading29<FONT COLOR="#000077"><B>TIP: </B></FONT>Two of the more
interesting character-based games, Rogue and Hack, do not come with the Linux distribution.
These games use the screen to display the rooms and corridors of a dungeon. You (and,
in Hack, your trusty dog) move around the dungeon, mapping out the corridors, entering
the rooms (be careful when you explore dark, unlit rooms), picking up treasure and
magical items--and, last but not least, fighting monsters (or running from them!).
After you have fully explored the level you're on, you can descend to a lower, more
difficult level. Every time you run Hack or Rogue, the dungeons are different. Every
monster has different fighting skills, and some monsters have special talents. The
magical items, which include rings, wands, scrolls, and potions, have a variety of
effects. Some of the items you find, such as armor, might be enchanted or magically
enhanced; but if you find a cursed item, you may have been better off not picking
it up at all! Both Rogue and Hack have their enthusiasts, but Hack is a later, more
elaborate version that is generally preferred. If you come across either game on
the Internet, pick it up and try it! There are also versions of Hack available for
MS-DOS-based computers.
<HR>
</DL>
<H4 ALIGN="CENTER"><A NAME="Heading30<FONT COLOR="#000077">Text Adventure Games</FONT></H4>
<P>These games follow the classic text-based formula: the system informs you that
"you are in a maze of small twisty passages, all alike" or something similar;
you type in your actions as <TT>go forward</TT>, <TT>east</TT>, <TT>take sword</TT>,
and so on. If you like solving puzzles, these games will appeal to you. With text-based
games, the adventure follows a defined path, and your responses are usually limited.</P>
<P>The following example is the start of the text-based game Battlestar, which you
will learn about in the next section. Your commands are typed at the <TT>>-:</TT>
prompt:<FONT COLOR="#0066FF"></FONT>
<PRE><FONT COLOR="#0066FF">Version 4.2, fall 1984.
First Adventure game written by His Lordship, the honorable
Admiral D.W. Riggle
This is a luxurious stateroom.
The floor is carpeted with a soft animal fur and the great wooden furniture
is inlaid with strips of platinum and gold. Electronic equipment built
into the walls and ceiling is flashing wildly. The floor shudders and
the sounds of dull explosions rumble though the room. From a window in
the wall ahead comes a view of darkest space. There is a small adjoining
room behind you, and a doorway right.
>-: right
These are the executive suites of the battlestar.
Luxurious staterooms carpeted with crushed velvet and adorned with beaten
gold open onto this parlor. A wide staircase with ivory banisters leads
up or down. This parlor leads into a hallway left. The bridal suite is right.
Other rooms lie ahead and behind you.
>-: up
You are at the entrance to the dining hall.
A wide staircase with ebony banisters leads down here.
The dining hall is to the ahead.
>-: bye
</FONT></PRE>
<PRE><FONT COLOR="#0066FF">Your rating was novice.
</FONT></PRE>
<P>Battlestar Type <TT>battlestar</TT> at the command prompt. A sample session is
shown in the code in the previous section. You can access a man page by typing <TT>man
battlestar</TT>. Dungeon Type <TT>dungeon</TT> at the command prompt. Typing <TT>help</TT>
at the game prompt gives you useful information. You start out-of-doors and you have
to find the dungeon entrance. There is no man page for Dungeon. Paranoia Type <TT>paranoia</TT>
at the command prompt. In this humorous game, you play a secret agent on a desperate
mission. Unlike most text-based adventure games, Paranoia lets you choose your actions
from a menu. This is useful if you hate having to find a command that the game will
understand. There is no man page for Paranoia. Wump Type <TT>wump</TT> at the command
prompt. You are out hunting the Wumpus, armed with some custom arrows and relying
on your wits and sense of smell. When you start the game, you are given the choice
of seeing the instructions.</P>
<P>Type <TT>man wumpus</TT> to see the man page.
<H4 ALIGN="CENTER"><A NAME="Heading31<FONT COLOR="#000077">Word Games</FONT></H4>
<P>The following two games are versions of popular word-finding and word-guessing
games. Boggle Type <TT>bog</TT> at the command prompt. This is a version of the Parker
Brothers game Boggle Deluxe. You are given a 5x5 grid of letters. In the allotted
time of three minutes, you type in words made up from the given letters. By default,
you must use letters that adjoin horizontally, vertically, and diagonally, without
reusing any letters. Plurals and different tenses count as different words--for instance,
"use," "uses," "used," and "user" are all
allowed in your word list. This follows the official Boggle rules. You can change
these defaults, if you want.</P>
<P>At the end, the computer displays the list of words which it found. You can never
beat the computer, because it only allows you to type in real words. You will discover
that the Boggle dictionary has some odd omissions; this can be annoying, but it isn't
very serious.</P>
<P>This game works well without color graphics, although the small size of the letter
grid makes your eyes blur after a while.</P>
<P>You can access a man page by typing <TT>man bog</TT>. Hangman Type <TT>hangman</TT>
at the command prompt. You won't miss the color graphics. The game is self- explanatory,
but just in case, a man page is available; type <TT>man hangman</TT>. Hangman picks
its words at random; sometimes the choices seem quite impossible to guess.
<H4 ALIGN="CENTER"><A NAME="Heading32<FONT COLOR="#000077">Card Games</FONT></H4>
<P>Because of the lack of graphics, the following games are not as successful as
the character-based word games. Canfield Type <TT>canfield</TT> at the command prompt.
This is a version of solitaire. You can access a man page by typing <TT>man canfield</TT>.
This game does not have the time-wasting potential of graphics and mouse-based solitaire
games. Cribbage Type <TT>cribbage</TT> at the command prompt. If you're a cribbage
fan, this game is for you. You can access a man page by typing <TT>man cribbage</TT>.
Go Fish Type <TT>fish</TT> at the command prompt. It's you against the computer at
Go Fish. A man page is available by typing <TT>man fish</TT>. One confusing aspect
is that sometimes several actions are displayed all together on the screen (for instance,
you have to go fish, the computer has to go fish, and it's back to you, all in one
block).
<H4 ALIGN="CENTER"><A NAME="Heading33<FONT COLOR="#000077">Board Games</FONT></H4>
<P>These are character-based versions of board games. The play quality is variable;
Backgammon is probably the best of the lot. Backgammon Type <TT>backgammon</TT> at
the command prompt; or, for an easy-to-follow tutorial on how to play Backgammon,
type <TT>teachgammon</TT>. These games don't suffer from lack of graphics, but the
lack of a pointing device such as a mouse means that specifying your moves is a cumbersome
task, requiring entries such as <TT>8-12,4-5</TT>. Typing <TT>?</TT> at the game
prompt gives you help on entering your moves.</P>
<P>Typing <TT>man backgammon</TT> gives you the manual entry for both Backgammon
and Teachgammon. Chess Several chess and chess-related programs come in the GNU Chess
package. Type <TT>gnuchess</TT> at the prompt to play chess against the computer.
There is an analysis program, <TT>gnuan</TT>. The game utility prints the chessboard
position to a PostScript printer or file.</P>
<P>Enter your moves using standard algebraic notation--for instance, <TT>e2-4</TT>.</P>
<P>This is an elaborate package; you should start by reading the man page.
<DL>
<DT></DT>
</DL>
<DL>
<DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -