3D Accelerated Fun

To truly appreciate the following pastimes, you will require a 3D accelerated video card and OpenGL or Mesa 3D video libraries. Many manufacturers sell these cards, and some are extremely well supported under Linux. Even when the card is supported, the manufacturer of the card may not distribute the accelerated driver for inclusion with the Linux distributions themselves. That doesn't mean they aren't available, but you may have to visit the vendor's site and download them. With some cards, full 3D acceleration is directly supported under XFree86, the graphical environment on which your desktop runs.

A quick way to test for the presence of 3D support is with the following command:

 glxinfo | grep rendering 

The system should respond with this:

 direct rendering: Yes 

Another nice little test you can perform involves running a program called gears (part of the Mesa-demos package). To do this, you need to shell out (open a terminal or Konsole window), type the command name (gears), and press <Enter>. A window will appear with three gears spinning on your screen (Figure 18-15).

Figure 18-15. gears, a 3D acceleration measuring tool.


Don't get too distracted by the spinning gears. Look back at your terminal window, and you will see some statistics regarding the performance of your 3D hardware.

 1778 frames in 5.001 seconds = 355.529 FPS 

That result comes from my test (play) system running with an NVIDIA GeForce2 card, and it is reasonably impressive hardware performance. In contrast, my notebook, which does not have accelerated hardware, yields this result:

 312 frames in 5.004 seconds = 62.350 FPS 

Not having acceleration for your card doesn't stop the program from working, it's just that it will run very slowly. On that note, let's have a look at our selection of 3D accelerated games, starting with a personal favorite.


You may not know this (well, you do now), but your humble author is also a pilot. Consequently, I have a warm spot in my heart for FlightGear, an extremely impressive open source flight simulator (Figure 18-16). The developers of this incredible package have produced a beautiful thing. The scenery itself is breathtaking, and the coloration of land and sky is verging on photorealistic. You can also download scenery packs for every bit of land mass in the world, allowing you to fly and explore distant lands from the comfort of your own room. Fancy a lazy flight through the Grand Canyon? With FlightGear, it's not a problem.

Figure 18-16. FlightGear, a great flight simulator.


FlightGear comes with a number of different aircraft models, from a single-engine Cessna to a Boeing 747, an A4 fighter (Figure 18-16), or even a Sopwith Camel.

Now that I have sold you on this (hopefully), I should tell you that this is one you will have to get online (http://www.flightgear.org) many distributions will not include it (partly because it can be a huge program). Multiple packages are also involved in this one (and don't forget the scenery), so make sure you read the information on the Web site carefully. Despite the extra work, the rewards for this one are well worth it.


These days, the official TuxRacer game (Figure 18-17) is actually a proprietary game (available at www.tuxracer.com), although it did start out as an open source project. Because of those GPL'ed, open source roots, you can still get your hands on the original TuxRacer from many different download sites. In fact, many distributions include it on the disk, so look there first. If you can't get enough of the free game, perhaps you'll pay the official site a visit.

Figure 18-17. Fast, frozen fun with TuxRacer.


The idea is simple. Tux races down snow or ice covered mountains on his belly. As the speed increases, you try to dodge obstacles while picking up herring along the way. The action is fast-paced and exciting, with Tux taking flight off the occasional cliff or ramp. All this as you race against the clock.

Moving to Linux(c) Kiss the Blue Screen of Death Goodbye!
Moving to Linux: Kiss the Blue Screen of Death Goodbye!
ISBN: 0321159985
EAN: 2147483647
Year: 2005
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net