Cooking with Linux - Crossing Platforms
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.
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).
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).
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 email@example.com. You can discover a lot of other things, including great WINE links, from his Web site at www.marcelgagne.com.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- SourceClear Open
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide