Welcome!

Linux Containers Authors: Liz McMillan, Elizabeth White, Zakia Bouachraoui, Pat Romanski, Stefana Muller

Related Topics: Linux Containers

Linux Containers: Article

'Tis the season to frag with Linux

How to take out shopping-related aggression with Cube, an earthy first-person shooter game

(LinuxWorld) — We're in that "special" time of year between Thanksgiving and Christmas. Shopping time and tempers grow short. Parking spots grow scarce. Frustrations grow and multiply. Even in small towns, it is hard to escape the insanity. Last week in a small town near where I live, a man went berserk in a Wal-Mart parking lot and drove his truck into five other vehicles, presumably cracking under shopping-induced pressure.

This holiday season, it's healthy to save a little quiet time for yourself. To meditate on life's simple pleasures. To quietly and contemplatively cozy-up with a good FPS and frag everything that moves.

FPS, if you don't speak video-game, stands for First Person Shooter. You know, games like Quake or Unreal Tournament. If you run Linux and don't have the cash to buy UT2003 or Quake 3, you might think this path to inner peace is not available to you. Fret not, my dweebs. Aardappel (AKA Wouter van Oortmerssen) and his friends are here to help you. So long as your video card supports 3D and OpenGL, that is.

Cube is the name and killing is the game. Written with a single codebase to support both Windows and Unix platforms through the magic of open standards like OpenGL and SDL, the game is both free as in beer and as in speech. Cube is not bogged down with a long storyline or complex gameplay. According to the documentation, the official storyline goes like this: "You kill stuff. The end."

Cube is free software, albeit not as in GPL'd code. It uses a GPL-compatible, free software-license called the Zlib license, which is similar to the BSD license.

I was curious about the name, so I asked Aard (short for Aardappel) where it came from. He explained, "Just before starting Cube I made a tiny spherical landscape engine called 'Sphere'. I then used the base rendering code to start Cube, and quickly typed in 'Cube' as project name, since the geometry was expected to be mostly cubes... I never changed the name and when I wanted to change it, it was too late. I now regret it, as it's not a very unique name, though it doesn't seem to have been very problematic."

Aard also told me that the project did not start to be open-source, although it was designed to be cross-platform from day one. He says that as the code matured, various people began to make it clear to him that they could put the game engine to good use, so he decided to make it open-source near the end of the development phase.

Video gaming these days is not just big business, it is huge business. Last year, video games outearned the movie industry by $1 billion. Since Aard's day job is to write code for a game company, I asked how he would benefit from the game. He says that he wouldn't, except for one thing: the fun of it. "Making an entire game from start to finish by yourself is very rewarding," he says.

As far as contributions from others, most have been in the form of maps and textures. Lee Salzman rewrote the networking code for the multiplayer modes using UDP instead of TCP. Other than that, it's almost all Aard's baby.

Oh, before I forget: Aard is not exactly your typical free-software developer. His normal desktop is Windows XP, and he uses Visual Studio .Net for development. Why is he doing open-source for Linux then?

"I have always worked on multiple platforms," Aard says. He adds that he used to be an Amiga user and was a Linux user very early on. "I think one should have very good reasons why to NOT make something portable, and with games (thanks to OpenGL + SDL) there aren't," he says. It's a pity that game publishers don't see things that way.

One of Cube's best features is the ease and speed with which you can create maps. You'll see references to this aspect of the project on almost every menu. This is one reason Cube has proved popular as a basis for others writing mods or their own complete games. There are a number of sites where you can find alternative Cube maps.

Before the fragging you must prepare!

Enough of that. Let the killing begin. Here is a quick primer to get you playing in single-player, death-match or online multi-player mode.

First, grab the latest version off the official Web site. After you've downloaded it, create a Cube subdirectory and unpack the Zip file like this:

mkdir cube 
cd cube 
unzip ../cube_downloaded_file.zip

The result will be a Cube directory containing the docs, source code, data and Windows/Linux executables. Change the permissions on the cube_unix script in the installation directory by typing:

chmod +x cube_unix

Then go into the bin_unix directory and give linux_client and linux_server the same medicine. That's it. That's the installation.

NOTE: If you download the 10-20-2002 version of the game, there is a nasty bug in it that causes lockups when joining multiplayer games. You can find a newer Linux client binary (the source is on the same site) at http://tunes.org/~eihrul. Download cube_linux_clients_2002_10_28.tar.gz and decompress it in the bin_unix directory.

Being the lazy type, I went a little further and created an alias to execute the game by adding the following to my .bashrc:

alias cube='cd /home/warthawg/cube/;cube_unix'

Before you start the game, you should edit the autoexec.cfg file found in the directory you created and at the very least enter a name for your player. You might also want to change some of the other settings, but I was fine with the defaults.

Lock and load

OK, now you're ready to start the game. If you created an alias like mine and have reloaded your .bashrc file, just type the alias from the command line. If you didn't, go into the directory you created and enter:

sh cube_unix

After the game starts up, hit the ESC key to get to the main menu. Use the up and down arrows to negotiate the menus and choose either the single or multi-player option.

If you've chosen the single-player (SP) mode, a new menu will appear, giving you the choice of starting an SP map, a DMSP (single-player death match) map or changing the skill level. On a scale of 1 to 10, Cube starts you off at level 3. The screenshot below shows the beginning of the map called aard-1, available in DMSP.

Single-player Death Match
Editor's note: The above image is reduced in size and color palette to allow it to load quickly. Click on this image to see the original.

The difference between the SP and DMSP was explained to me on the #cube IRC channel. SP comes with a fixed number of opponents placed where the creator of the map desired. The death-match entries automatically spawn bot opponents as you kill them.

To play against others online, select multiplayer from the main menu, then select server browser. I usually find two to five active servers, but there are not always players available. Just keep checking, or start your own server and wait for others to come to you.

You can also amuse yourself by downloading custom maps created by others. I grabbed one called "myfilthymind" from pushplay's site (see Resources for the URL). I unzipped it in the packages directory. The next time I started cube, I pressed the tilde key to get a prompt, then entered map filthymind and there I was. As I mentioned earlier, making maps for Cube is a popular activity, so you can find a lot of them to play.

Is Cube the smoothest, most-polished, most-powerful game engine available for Linux? No way. However, it has a very real, earthy tone to it that you don't often find in commercial games. It is fun, and it is free. Moreover, not only can you use it to exorcise whatever demons are hounding you, you can create your own little universe to do it in.

This holiday season, Ol' Doc Barr recommends spending some quality time with Cube before your next trip to Wal-Mart. You and your fellow shoppers will thank me for it.

More Stories By Joe Barr

Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.
The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, compared the Jevons Paradox to modern-day enterprise IT, examin...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
DSR is a supplier of project management, consultancy services and IT solutions that increase effectiveness of a company's operations in the production sector. The company combines in-depth knowledge of international companies with expert knowledge utilising IT tools that support manufacturing and distribution processes. DSR ensures optimization and integration of internal processes which is necessary for companies to grow rapidly. The rapid growth is possible thanks, to specialized services an...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...