Search the Catalog
Learning Debian GNU/Linux

Learning Debian GNU/Linux

By Bill McCarty
1st Edition September 1999
1-56592-705-2, Order Number: 7052
360 pages, $34.95 , Includes CD-ROM

Previous: 9.1 A Survey of Linux Games Chapter 9
Playing Linux Games
Next: 10. Setting Up a Linux-Based LAN
 

9.2 Closeups of Some Popular Games

In this section, you'll get acquainted with three popular games you can run under Linux:

9.2.1 DOOM

Originally written for MS-DOS by id Software ( http://www.idsoftware.com/), DOOM is the archetypal 3D action game. You play the role of a space marine, fighting your way through a series of bases on the moons of Mars that have been invaded by aliens. The game features real-time 3D graphics and stereo sound effects. Figure 9.1 shows a typical game screen.

Figure 9.1: A typical DOOM screen

Figure 9.1

If you prefer more cunning opponents, you can play the game in network mode, via modem, or an IPX or TCP/IP network. Network mode lets you match wits with two to four human opponents.

To run DOOM in a console, type the following command:

sdoom -warp 1 1

If you prefer to run DOOM under X, type the following command:

xdoom -warp 1 1

To call up DOOM's main menu, simply press Esc.

You can learn more about DOOM by visiting the DOOM Archives at http://www.idsoftware.com/archives/doomarc.html and the Linux DOOM FAQ at http://jcomm.uoregon.edu/~stevev/Linux-DOOM-FAQ.html. You might also enjoy lxDoom, a Linux port of Boom, which is an enhanced version of DOOM.

9.2.2 Quake II

Like DOOM, Quake II was also written by id Software. However, Quake II is a much more modern and sophisticated program than DOOM. For example, Quake II's multi-player mode lets as many as 32 players wander the planet of Stroggos. And, the single-player mode pits you against 18 artificially intelligent adversaries, who dodge your careless shots with agile ease. Figure 9.2 shows a typical Quake II game screen.

Figure 9.2: A typical Quake II screen

Figure 9.2

To run Quake II under X, change the working directory to the directory in which you installed Quake II, and issue the command:

./quake2 +set vid_ref softx

To run Quake II using a virtual console, issue the command:

./quake2 +set vid_ref soft

Once the game is running, you can access its main menu by pressing Esc.

9.2.3 Starcraft

Starcraft is a real-time strategy game published by Blizzard Entertainment, in which you participate as the leader of a group of humans exiled at the edge of galactic space. Your objective is to assemble a military force capable of dominating two other species, the Protoss and the Zreg. To do so, you must build bases, vehicles, and weapons, and train soldiers for combat.

Starcraft was not written for Linux; however, you can run it under Linux by using WINE. Assuming that you have WINE installed on your system, the following sections explain how to install and run Starcraft:

9.2.3.1 Installing Starcraft

If you have the commercial version of Starcraft, mount the CD-ROM diskette and locate the file install.exe. If you want to try the Starcraft demo, download the file scdemo.exe, which is a little over 28 MB in size. You can find the file on Blizzard's Web site ( http://www.blizzard.com/) and elsewhere.

Change the current directory to the directory containing install.exe or scdemo.exe and use WINE to install Starcraft:

wine -display localhost:0 -winver win95 scdemo.exe

When asked if you want to install DirectX 5, highlight the No, But Continue option and click on OK. Choose the directory in which you want to install Starcraft (the default choice is generally acceptable) and click on OK. If the program asks if you want to register via the Internet, respond by clicking on No. Finally, click on Exit to terminate the install program.

Under Linux, Starcraft operates in 256-color 640480 mode. Therefore, you must adjust your X configuration to provide this mode. Here's a quick way to do that. First copy the file /etc/X11/XF86Config by issuing the following commands:

cd /etc/X11
cp XF86Config XF86Config.SAVE
cp XF86Config XF86Config.StarCraft

Now, edit the file XF86Config.StarCraft using the editor of your choice. Find the "Screen" section that specifies the X server (driver) you use and change the Depth parameter to 8 and the Modes parameter to "640x480". Delete any additional modes that appear. When you're done, the screen section should resemble the following:

Section "Screen"
  Driver      "svga"
  Device      "Millennium"
  Monitor     "Viewsonic17GS"
  Subsection "Display"
    Depth       8
    Modes       "640x480"
    ViewPort    0 0
    Virtual     640 480
  EndSubsection
EndSection

9.2.3.2 Playing Starcraft

To play Starcraft, replace your XF86Config file with the newly edited one:

cp XF86Config.StarCraft XF86Config

Then start X:

startx

Launch an X terminal, make the Starcraft installation directory the current directory, and start the Starcraft program:

# 

cd "/c/Program Files/Starcraft Shareware(ED)"
# 

wine -display localhost:0 -winver win95 -depth 8 \
> 

-geom 640x480 Starcraft.exe

If you installed Starcraft to a directory other than /c/Program Files/Starcraft Shareware(ED), you should adjust the commands accordingly.

Now, play Starcraft until you completely dominate the galaxy. The tutorial mission will help you learn how to do so. Of course, planning and executing a winning strategy will require practice.

9.2.3.3 Ending a Starcraft session

When you're done, press F10 to obtain a game menu, exit the current mission, and exit the game. Then, replace your original XF86Config file by entering the commands:

cd /etc/X11
cp XF86Config.SAVE XF86Config

Previous: 9.1 A Survey of Linux Games Learning Debian GNU/Linux Next: 10. Setting Up a Linux-Based LAN
9.1 A Survey of Linux Games Book Index 10. Setting Up a Linux-Based LAN

Back to: Learning Debian GNU/Linux


oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy

© 2001, O'Reilly & Associates, Inc.