Cooking with Linux - Crossing Platforms

Marcel takes a tour of a variety of games from a classic genre. Quick! Jump!

Careful, François, you're going too fast! You're going to fall in...too late. Ah, mon ami, you have lost another life to the deep blue sea. In fact, you have lost all four, which means it is my turn. I know we are playing a game, but we also are sampling the fare on tonight's menu, mon ami, testing it as part of Chez Marcel's extensive quality control. Still, our guests will be here shortly, and I have yet to select a wine.

They are here already? My apologies, mes amis, we are somewhat distracted. Welcome to Chez Marcel, where fine wines always accompany fine Linux fare. Quick, François, to the wine cellar. Given the light nature of tonight's menu, we need something that's light and easy-drinking. Bring back the 2001 Modello Italian red.

My faithful waiter and I were looking at examples of a particular type of video game often referred to as a platform game. The idea of these games is fairly simple, and most tend to be scrolling two-dimensional affairs. While moving from level to level, searching for or collecting objects as you go, your player must run, jump and avoid objects or enemies. To do so invariably involves climbing or jumping across platforms that make it possible to move from one place to another. This type of game has been around for years but continues to be popular, and new ones are created all the time. This also is true in the Linux world.

Many years ago, when this humble Chef was quite a bit younger, I was hooked on a game called Lode Runner. Dave Ashley's excellent Scavenger is similar to this classic game and is great fun to play (Figure 1). The idea is simple. You run around climbing ladders, shimmying across ropes and running from one platform to another, collecting gems while avoiding the bad guys. Depending on what is beneath your feet at the time, you also have the ability to dig holes, either for escape or to trap enemies.

Figure 1. Scavenger is an excellent homage to the old Lode Runner.

Get your copy of X Scavenger by heading to the Scavenger Web site (see the on-line Resources), where you'll find the latest source. I have found that many contrib sites also offer precompiled binaries of the program, so you may want to look in your favorite distribution's offerings. That said, building Scavenger from source is not difficult. It's a slight variation on our classic extract and build process:

tar -xzvf xscavenger-1.4.4.tgz
cd xscavenger-1.4.4/src
xmkmf
make
su -c "make install"

The command name is scavenger, so that is what you have to run to start the game. It starts in demo mode, so you can watch the action and get a feel for how it works. Pressing F1 starts your game at your highest level; if this is the first time you are playing, you start at level 1.

Game controls are on the numeric keypad, though the cursor keys work for moving left, right, up and down. Two additional functions are provided for digging to the left and to the right. If you don't like the default key mapping, which is a problem on a notebook keyboard, and already are playing a game, press Esc and then press the spacebar. This takes you to the configuration menu. Now, press F10 to remap your keyboard. I left the cursor keys as is for movement, but I chose the A key to dig left and the D key to dig right.

While you are busy remapping your keyboard, you might notice some other interesting options here. For instance, you can choose to demo various levels. Pressing F7 or F8 lets you go up or down levels in the demo mode. Possibly my favorite feature, though, is the level editor. Simply press F3 and you can create your own Scavenger levels, a great way to eat up your time.

There's nothing like a nice, friendly game to whet your appetite. It is extremely tempting for me to add a smiley somewhere in the last sentence, partly due to the next platform game I want to tell you about, a game of smileys gone bad. The game is called Blob Wars: Metal Blob Solid, from Parallel Realities, and it's one of the stranger games I've played.

Blob Wars is a rescue-the-MIAs game with a bizarre twist. All of the characters are smileys, blobs if you will, and your task as Blob Soldier Bob is to traverse various unfriendly but occasionally nice-looking areas looking for other soldiers being held prisoner. Your job is to run your smiley soldier, firing various weapons—make sure you pick up the laser—at your opponents, jumping from platform to platform as you try to complete your mission without being destroyed (Figure 2).

Figure 2. Your job, soldier, is to rescue the MIA blobs. Any questions?

Precompiled RPMs and Debs are available from the Parallel Realities Web site, as is a source package should you need or want to compile the program yourself. You need the various SDL development libraries, but otherwise it's quite simple, only four steps:

tar -xzvf blobwars-1.02-1.tar.gz
cd blobwars-1.02
make
su -c "make install"

To play, launch the command blobwars. When the game starts, you are presented with a menu from which you can start a new game or continue one already in progress. The Options menu lets you switch from windowed to full-screen mode. You also can adjust the volume of both the sound and music track, as well as the brightness level. In addition, you can decide whether you want to have the blood and gore turned on. Yes, as you fire on enemy blobs, they scream and explode into a bloody fireworks display. Sure, it's a little over the top, but the game is great fun. Really.

You then are presented with a map identifying several locations where MIAs are being held. Each location constitutes a mission. In the course of the rescue operation, a number of useful objects are there for the taking. These could be a jet pack, laser guns, grenades or keys to open doors. Sometimes you pick up these objects from fallen enemies. When you find an MIA, simply walk over to it and it is beamed away from the action. As a Star Trek fan from way back, I loved the transporter graphics and sound effects.

Could we possibly do justice to a menu of Linux platform games without including Tux, our favorite mascot? SuperTux is a classic jump-and-run platform game in the style of, you guessed it, Super Mario Bros. Under Tobias (Tobgle) Glaesser's lead, but originally created by Bill Kendrick, the current alpha release of SuperTux is guaranteed to provide you with hours of fun. Don't let that first alpha milestone fool you—this is a great game, one you absolutely need to check out.

The story goes like this: Tux and Penny (Tux's love interest) are out on a nice date when Tux is knocked out and his lovely Penny is penguinnapped by the evil Nolok. Held prisoner in Nolok's equally evil fortress, Tux must brave all sorts of perils to save his lovely lady. It is your job to help Tux succeed in his quest (Figure 3).

Figure 3. Can Tux save his beloved Penny from the evil Nolok?

Binary packages for a variety of distributions and platforms are available at the SuperTux Web site (see Resources), so there may be no need to build from source. Should you decide to go that route, though, building SuperTux is a classic extract and build five-step:

tar -xjvf supertux-0.1.2.tar.bz2
cd supertux-0.1.2
./configure
make
su -c "make install"

The game can be played entirely with cursor keys, but joysticks and gamepads also are supported. Start the program by running the supertux command. The program starts with a handful of choices, such as jumping right into the game, loading a couple of bonus levels or creating your own, a little something for later. You also can set various options, including OpenGL support, sound and music settings and so on.

The play is fast and fun. Jump over the many enemies to avoid them. Objects are at different levels, so you climb or jump onto platforms to get from one obstacle to another. Collect gold coins as you go. Smash ice blocks with Tux's head to discover power flowers or ice balls that transform him into SuperTux, a being of enhanced strength and power! When you complete a level, you are transported to the next, more complicated level. I'm still on level four as I write this.

Oh, no! Knocked out by that sliding ice block again. I think it's definitely time for a refill, François. Given the theme of this last game, I think you should serve the Baked Alaska now. I also see that closing time is nearly upon us, but have no fear, mes amis. We will keep the doors open and the wine flowing. There is no hurry. Besides, the Baked Alaska needs to be eaten and Penny needs to be saved before François and I can close the restaurant for the night. Therefore, mes amis, let us all drink to one another's health. A votre santé Bon appétit!

Resources for this article: /article/8129.

Marcel Gagné is an award-winning writer living in Mississauga, Ontario. He is the author of the all-new Moving to the Linux Business Desktop (ISBN 0-131-42192-1), his third book from Addison-Wesley. He also is a pilot, was a Top-40 disc jockey, writes science fiction and fantasy and folds a mean Origami T-Rex. He can be reached at mggagne@salmar.com. You can discover a lot of other things, including great WINE links, from his Web site at www.marcelgagne.com.

______________________

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState