Welcome!

Linux Containers Authors: Zakia Bouachraoui, Elizabeth White, Liz McMillan, 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
@CloudEXPO and @ExpoDX, two of the most influential technology events in the world, have hosted hundreds of sponsors and exhibitors since our launch 10 years ago. @CloudEXPO and @ExpoDX New York and Silicon Valley provide a full year of face-to-face marketing opportunities for your company. Each sponsorship and exhibit package comes with pre and post-show marketing programs. By sponsoring and exhibiting in New York and Silicon Valley, you reach a full complement of decision makers and buyers in ...
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.
LogRocket helps product teams develop better experiences for users by recording videos of user sessions with logs and network data. It identifies UX problems and reveals the root cause of every bug. LogRocket presents impactful errors on a website, and how to reproduce it. With LogRocket, users can replay problems.
Data Theorem is a leading provider of modern application security. Its core mission is to analyze and secure any modern application anytime, anywhere. The Data Theorem Analyzer Engine continuously scans APIs and mobile applications in search of security flaws and data privacy gaps. Data Theorem products help organizations build safer applications that maximize data security and brand protection. The company has detected more than 300 million application eavesdropping incidents and currently secu...
Rafay enables developers to automate the distribution, operations, cross-region scaling and lifecycle management of containerized microservices across public and private clouds, and service provider networks. Rafay's platform is built around foundational elements that together deliver an optimal abstraction layer across disparate infrastructure, making it easy for developers to scale and operate applications across any number of locations or regions. Consumed as a service, Rafay's platform elimi...
Two weeks ago (November 3-5), I attended the Cloud Expo Silicon Valley as a speaker, where I presented on the security and privacy due diligence requirements for cloud solutions. Cloud security is a topical issue for every CIO, CISO, and technology buyer. Decision-makers are always looking for insights on how to mitigate the security risks of implementing and using cloud solutions. Based on the presentation topics covered at the conference, as well as the general discussions heard between sessio...
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Day 2 Keynote at 17th Cloud Expo, Sandy Ca...
New competitors, disruptive technologies, and growing expectations are pushing every business to both adopt and deliver new digital services. This ‘Digital Transformation’ demands rapid delivery and continuous iteration of new competitive services via multiple channels, which in turn demands new service delivery techniques – including DevOps. In this power panel at @DevOpsSummit 20th Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, panelists examined how DevOps helps to meet the de...
According to Forrester Research, every business will become either a digital predator or digital prey by 2020. To avoid demise, organizations must rapidly create new sources of value in their end-to-end customer experiences. True digital predators also must break down information and process silos and extend digital transformation initiatives to empower employees with the digital resources needed to win, serve, and retain customers.
In his keynote at 18th Cloud Expo, Andrew Keys, Co-Founder of ConsenSys Enterprise, will provide an overview of the evolution of the Internet and the Database and the future of their combination – the Blockchain. Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life ...