📄 965-968.html
字号:
<HTML>
<HEAD>
<TITLE>Linux Unleashed, Third Edition:Games</TITLE>
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!--ISBN=0672313723//-->
<!--TITLE=Linux Unleashed, Third Edition//-->
<!--AUTHOR=Tim Parker//-->
<!--PUBLISHER=Macmillan Computer Publishing//-->
<!--IMPRINT=Sams//-->
<!--CHAPTER=61//-->
<!--PAGES=965-968//-->
<!--UNASSIGNED1//-->
<!--UNASSIGNED2//-->
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch60/961-964.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="968-972.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
<P><BR></P>
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 61<BR>Games
</FONT></H2>
<P><I>by Ed Treijs and Tim Parker</I></P>
<DL>
<DT><B>In This Chapter</B>
<DT>• Which games have you installed?
<DT>• X Games
<DT>• Character-based games
</DL>
<P>A variety of games come with most Linux CD-ROMs and there are a lot more available through FTP sites and CD software collections. The available games can be roughly divided between those that require X to run and those that will run in plain text mode (on a character terminal). In this chapter, you will learn about both types of games. The chapter provides a reasonably complete list of both X- and character-based games.
</P>
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">Which Games Have You Installed?</FONT></H3>
<P>The games listed in this chapter come in several different installation packages, so you may not have one or more of these games on your system. For instance, the graphical versions of <TT>tetris</TT>, <TT>gnuchess</TT>, and <TT>xfractint</TT> are each installed separately.</P>
<P>If one of the listed games sounds intriguing, you may want to install it if you haven’t done so already.</P>
<H3><A NAME="Heading3"></A><FONT COLOR="#000077">X Games</FONT></H3>
<P>The following games all require X to run. You can find most of the X games in a number of directories, depending on the version of Linux you use. Typical installation directories for games are
</P>
<DL>
<DD><B>•</B> <TT>/var/lib/games</TT>
<DD><B>•</B> <TT>/usr/games</TT>
<DD><B>•</B> <TT>/usr/lib/games</TT>
<DD><B>•</B> <TT>/usr/local/games</TT>
<DD><B>•</B> <TT>/usr/share/games</TT>
</DL>
<P>In many cases, you will have all these directories installed with games in each.
</P>
<P>Because X is a graphical, windowing environment, you might guess that X games are graphically oriented. You would be right! Almost all of the following games use color and bitmapped graphics. Often, you can specify the palette of colors the game will use.</P>
<P>However, you should keep in mind the following:</P>
<DL>
<DD><B>•</B> Arcade games and home video game systems have dedicated hardware that is designed specifically for running games. X Window is a generic environment. Even today’s powerful personal computers can’t match the speed and smoothness of movement of a game machine.
<DD><B>•</B> Games work your hardware and operating system software harder than any other application. For best performance, games are often programmed to run “close to the edge” and do various software and hardware tricks. You might find that one or more of these games crash your system or have strange side effects.
<DD><B>•</B> The X games that come with Linux are personal efforts. The individuals who wrote the games and allow free distribution appreciate suggestions and help in further development. Don’t hold these games to commercial standards—they are not commercial products.
<DD><B>•</B> The Slackware version on the CD-ROM lets you install two types of games. The “Y” set contains the BSD games collection and the other set “XAP” contains the games with X Window support. Install both versions and then remove the games you don’t like.
</DL>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>Note: </B><BR>It’s tempting to put new games in <TT>/usr/games</TT>, though the most common area for user-installed games is in <TT>/usr/local/games</TT>. The <TT>/usr/games</TT> directory is usually reserved for games that come with the system.<HR></FONT>
</BLOCKQUOTE>
<P>Following is a discussion of the X games you should find on your system. Keep in mind that installation differences might mean that you have more or fewer games.
</P>
<H4 ALIGN="LEFT"><A NAME="Heading4"></A><FONT COLOR="#000077">Games in the xdm Root Menu</FONT></H4>
<P>If you use the X display manager <TT>xdm</TT>, the <TT>xdm</TT> Root menu (usually accessed by holding the right mouse button while the cursor is in the root screen area) has a Games submenu choice. From the Games menu, you can then choose a Demo/Gadgets submenu. If you use a different window manager, such as Motif, your menus will be correspondingly different. Games available through the menu depend on the version of Linux, too. Here’s a list of some Linux X-based games and a description of them.</P>
<P><FONT SIZE="+1"><B>Spider (Small and Large)</B></FONT></P>
<P>This is double-deck solitaire. There is no difference in the play of Spider (small) and Spider (large). The difference is that the small Spider game uses smaller cards and therefore fits into a smaller window than the large Spider game.
</P>
<P>To see this game’s man page, type <TT><B>man spider</B></TT>.</P>
<P>To start this game, type <TT><B>spider</B></TT> in a command-line window.</P>
<P>This game requires a fair bit of thought, planning, and skill. The aim is to arrange cards of the same suit in descending order. You can also, however, have cards of different suits arranged in descending order. Sometimes this can help you immediately, but hinder you in the long run! Note that if you do have two or more consecutive cards of the same suit, those cards will move as a group. Spider is challenging; don’t try to play it just to pass the time!</P>
<P><FONT SIZE="+1"><B>Puzzle</B></FONT></P>
<P>This is a superior version of the game—usually played at a child’s party—in which you push around 15 numbered tiles on a 16×16 grid, trying to get the numbers in order.
</P>
<P>To see this game’s man page, type <TT><B>man puzzle</B></TT>.</P>
<P>To start this game, type Puzzle in a command-line window.</P>
<P>The reason the X version of Puzzle is superior is because the pieces move very smoothly. Let’s face it, the party favor plastic versions kept jamming and sticking. This is a vast improvement.</P>
<P>If you click on the left box, the game gives you a random starting position. Click on the right box and watch the game solve itself! (Try clicYking on the right box when the numbers are already in order.)</P>
<P><FONT SIZE="+1"><B>GNU Chess</B></FONT></P>
<P>This is a graphical version of GNU Chess that uses the <TT>xboard</TT> display system.</P>
<BLOCKQUOTE>
<P><FONT SIZE="-1"><HR><B>Warning: </B><BR>Running GNU Chess under <TT>xboard</TT> is very resource-intensive. It may crash your system.
<P>Adding more swap space may correct an agonizingly long response time. Do not worry, it’s not your system—it’s GNU Chess.<HR></FONT>
</BLOCKQUOTE>
</P><P><BR></P>
<CENTER>
<TABLE BORDER>
<TR>
<TD><A HREF="../ch60/961-964.html">Previous</A></TD>
<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>
<TD><A HREF="968-972.html">Next</A></TD>
</TR>
</TABLE>
</CENTER>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -