Page 1

LINUX: An Industrial-Strength OS For Industrial-Strength Gaming

by Peter "Zhukov" Pawelek

Article Type: How-To
Article Date: July 03, 2001

Get Rid of those Wizards and Dancing Paperclips!

We combat simmers love our high performance rigs. We love tweaking them and playing complex simulations on them. Were an odd breed that way, compared to your average computer user who will contentedly settle for a bit of word processing and maybe some web surfing; and to a large extent our thirst for cutting edge computational power has driven the incredible increases in home computing power. I mean, we dont really need a 1.2 gig Athlon system to diddle around on Microsoft Word, do we? Hell no!

Okay then, if youre with me this far Ive got to ask you a question: if you like so much raw power at your beck and call, why do you put up with a rinky-dink operating system that crashes on a daily basis, spitting out Blue Screens of Death like rockets from a Katyusha, and doing all sorts of things to your beloved big rig that youre not even aware of? Why, when you want to run a sim that will suck up all of your available RAM and then some, do you have to run it on top of an operating system that has a bloated web browser incorporated into it??? Dont you think you could do a better job of allocating your own system resources? Of course you can! You can have the power! You need an industrial strength operating system to go with that bad boy of a box sitting on your desk. And Linux is the OS to do that bad boy justice.

You see, the best-kept secret among us hard-core computer geeks is a secret no longer. Linux has become a household word (even though most people still dont use it) during the high-tech boom of the late nineties, and with good reason. Its a very powerful, free, full blown UNIX-like operating system that will run on any x86 processorand comes complete with source code! Besides, everything I've been hearing about the upcoming Windows XP makes me think that Win98 may be my last Microsoft OS. It seems that other people are starting to feel the same way.

I maintain that for people like us who are serious about our combat simulations, Linux could be an ideal gaming platform. Why? For one thing, Linux is rock-solid stable. People have reported uptimes (thats the amount of time between reboots) on the scale of YEARS, not days. It can easily multitask hundreds of concurrent processes without breaking a sweat. Also, theres very little sitting between your application and the iron; Linux is extremely efficient. Also, you can load fancy X-Windows desktops like KDE and GNOME (more on these later) that make Windows 98 look like a cute little squeak toy.

With the latest version of XFree86 (the GUI windowing system that comes with Linux), 3D acceleration (via OpenGL/glide) is built right in to the system and Nvidia has released drivers specifically designed to optimize TNT2 and GEForce performance under Linux. Of the games that run natively under Linux (ie. Quake 3, Unreal Tournament), framerates have been reported to be as good if not better than under Windows. So why shouldnt this apply to airplane and tank simulations as well? From what Ive been hearing, something like WW2 Online could probably benefit from running under Linux since system resources are used much more efficiently.

There are all sorts of groovy power tools that you get with a typical Linux system. You can download oodles of free software that will run on your Linux box that are as powerful as similar commercial products that come with the hefty price tags. Want to do sophisticated image manipulation, but dont have the $800 or so to shell out for Photoshop? No problem, download the GIMP. How about 3D modeling (always a favourite topic amongst the skinners and modders out there)? Well, theres Blender, an app for Linux that can do pretty much everything that 3D Studio Max can dowhile keeping that $3000 in your wallet.

And if you're a programmer, Linux has full-blown enterprise-level implementations of just about every computer language and programming environment under the sun. The lifeblood of the Linux world is free, open-source software. You can run all this software on your Linux rig, saving literally thousands of dollars, without even worrying about the fact that youre pirating it since it all comes with no strings attached. And, yes, a lot of these free programs have been ported to Win95/98, but keep in mind that they were originally designed to run under Linux, and are most stable in a Linux environment (not to mention that the most up-to-date versions of these programs always come out for Linux first).

It does sound too good to be true, doesnt it? Well, there are downsides to running Linux on your computer. For one thing, its complex and not very user friendly. If we were to resort to car analogies, Windows 98 is like a Ford Taurus with automatic transmission, whereas Linux is like a stripped down muscle car and youve reassembled its engine a few times in your garage for kicks. The Taurus will get you from point A to point B somewhat reliably (well things do break down, but heck you just bring it into a garage and theyll fix it up for you), but the muscle car can get you from point A to point B by taking a little detour around points E through J, getting a burger and a coke at a drive-through at point M, and popping a wheelie on point Z, and all before the Taurus has even left the driveway. The thing is, when theres a problem with the muscle car youre on your own. Order those spare parts from some obscure garage in Finland, roll up your sleeves and get ready to take apart that engine again.

But this is where the beauty of Linux comes in. You see, by having to tinkering around with it, and by being forced to your own resources to solve problems (ie. combing USENET archives, reading FAQs and HOWTO's, and following discussion groups and mailing lists), you learna lot. After getting a Linux box successfully up and running youll never be afraid of a computer again. Its an empowering and rewarding experience. But hey, Im talking to people who can rip through the avionics of Falcon 4 or FA-18 without batting an eyelash. If you can do that, you can install and run Linux on your system.

The other downside? Well, right now the biggie for all of us is the lack of good games. This is changing. A company called Loki Entertainment has been steadily porting over a number of high profile computer games over the last few years so that they will run natively under Linux. So far, theyve produced high quality Linux versions of: Tribes 2, Sid Meiers Alpha Centauri, Deus Ex, Soldier of Fortune, Unreal Tournament, Descent 3, Quake III, and Heavy Gear 2, among others. On top of that, there is a nifty program called WINE which stands for WINdows Emulator. Its provides the bare resources necessary for a Windows program to run under Linux; from the programs point of view, its running under Windows. WINE is still in an alpha/beta stage (youll have to get used to thismost Linux software is on the unstable cutting edge), so be prepared to futz around with it to get it to work. However, people have reported some big successes with WINE including Half Life and Starcraft.

Then of course, there are oodles and oodles of game projects that were designed to be Linux games from the start. Youll find that most of these projects are in various stages of completion, and I must say most are rather amateurish. Lets not kid ourselvesat the present time, you cannot beat Win98 as a gaming platform, especially for combat simulations and wargames. However, I am interested in exploring the potential for Linux to run these games. In the second instalment, Ill be focussing more closely on WINE to see if I can get some of my favourite combat sims and wargames to run under it.


Kids, Dont Try This at Home Without Parental Supervision!

Ok, before we go on its time for me to lay down the mighty catch-all disclaimer. If this article inspires you to try out Linux, YOU ARE ON YOUR OWN! Im not going to take any responsibility for anyones computer blowing up (well, actually, hehe monitors CAN blow up if you dont configure them properlyhehemore on that later). Linux is not for everyone. It takes a lot of effort and patience to get Linux running properly. You have to go into it with an attitude that things WILL go wrong, and you WILL have to do a lot of reading and preparation to make sure it works alright.

I highly recommend getting a hold of a copy of Running Linux by Matt Welsh (published by OReilly and Associates). This book was my bible when I first started monkeying around with Linux, and I still consult it regularly. Its written with the beginner in mind, but it doesnt dish out baby talk like some of those For Dummies books. Read the chapters of this book on installation and configuration before even beginning to install Linux. If you buy a commercial distribution like Redhat, the included manuals will serve the same purpose.

Perhaps an anecdote will help. Around dinner time one evening last winter, we received a panic-stricken phone call from the younger brother of my wifes best friend. He decided he was going to install Linux on his computer so he went ahead and trashed his Windows partition, paving it over with a fresh Linux installation. Turns out, he had no clue how to configure his video card and monitor, and he couldnt get on the Internet to consult some Linux sites about it because he also had no clue how to configure his modem under Linux!! He had effectively (but not irreversibly) rendered his computer useless. I told him that his only recourse was to trash the Linux installation, repartition his hard drive in two and to reinstall Win98 in one of the partitions. After that, I told him, he could think about reinstalling Linux. This way, he could have a dual-boot setup and still get onto the Internet under Windows to sort out his Linux problems.

This is the also the route I recommend for any of you that want to try out Linux. DONT get rid of Windows completely; you WILL need to get onto the Internet at some point to get the answer to some problem concerned with how to get a particular piece of hardware running under Linux. Remember, installing Linux for the first time is a learning experience and you will inevitably make some mistakes along the way. Fortunately, in most cases, these mistakes are easily rectified.


The Best of Both Worlds

Yes, it is possible to have both Linux and Windows peacefully co-existing on your computer. If you have a single hard drive with one Windows partition on it, youll have to use a utility like Partition Magic to shrink that Windows partition so that Linux can be installed into a new and separate partition. A fully loaded Linux system can take up to 2 GB of hard drive space, so plan accordingly. Mind you, you wont end up installing everything that comes with a typical Linux distribution, but nonetheless Id recommend at least a 5GB partition for your Linux filesystem.

With all that cool free software out there, youll find that your hard drive can fill up awfully fast! Youll also have to allocate a swap partition for Linux to use for virtual memory, and here the rule of thumb is that the size of the swap partition should be about equal to the amount of physical ram you have.

In my particular setup, I have an older 6GB hard drive containing my Linux system which is slaved to my 20GB master hard drive containing my Windows 98 system. When I installed Linux, I chose to install a utility called LILO (Linux Loader), which gives me a menu at boot time asking me whether I want to load Windows or Linux. The two operating systems are completely separate. Of course, because Linux is more sophisticated, once I have it running I can mount my entire Windows partition as a directory in my Linux filesystem giving me access to all of its files; at the command prompt all I have to type in is mount t vfat /dev/hda /dosc and voila! Windows, on the other hand, is blissfully ignorant of the Linux system.


So, What Exactly is Linux Anyway?

Alright, Ive already jumped the gun by talking a bit about distributions and filesystems and stuff like that, so perhaps I should explain some of the basics. To be precise, Linux is whats referred to as a monolithic kernel. Basically, its a huge chunk of compiled code that acts as an interface between you and all of your computer hardware. It manages running processes, allows software to talk to hardware, and allocates system resources like physical and virtual memory. Thats it.

Some people consider it misleading to call the entire operating system Linux. The reason for that is that the Linux kernel always comes with a suite of helper programs that make using the operating system a lot more human-friendly. The bulk of these programs, including the C/C compiler that is used for just about everything, were developed by an organization called GNU (for GNU is Not Unix) based at MIT and helmed by a guy named Richard Stallman. In fact, Mr. Stallman thinks that everyone should be calling the system GNU/Linux, and not just Linux. Of course, GNU/Linux is a tad unwieldy, so we (along with just about everyone else in the world except for Mr. Stallman and his ragtag band of GNU zealots) will go on calling it Linux.

Then theres the complication of distributions. You see, the Linux kernel plus the GNU utilities are still but a small portion of a full blown Linux system. You will always install a particular distribution of Linux. A distribution is a complete operating system with a lot of additional nifty programs and doodads, usually packaged by a company like Redhat. In fact, Redhat Linux is the most popular distribution out there right now, and also the easiest to install and use. I actually recommend Redhat if you need to get a fully functioning Linux system up fast out of the box with a minimum of configuration. You can either download it for free from their ftp site, or go out and buy a boxed version of Redhat Linux that will come with very helpful manuals as well as some technical support.

Other distributions include Slackware (which is what I run) and Debian. Slackware is perhaps one of the oldest Linux distributions; I remember downloading my first Slackware distribution from the McGill University ftp server in 1995. At the time it fit onto about ten floppies. Today, the entire Slackware distribution fills an entire CDROM!! Slackware is notorious for being the least 'user friendly' Linux distribution. This is because everything has to be configured manually, and there are few automated scripts and packaging systems to aid in installing software or configuring your system.

Setting up a Slackware box is THE best way to really learn Linux. Debian is what many people consider to be a pure Linux distribution. This is because, it is the one most faithful to the ideologies of GNU and the GPL (GNU Public License...the open source software license that allows you to run all this software for free with the stipulation that if you distribute or modify GPL'd software you must include the source code with the distribution); as such, the Debian distribution will contain only free open-source programs, untainted by 'nasty' commercial pre-compiled stuff .

A Debian user will likely call his Linux system GNU/Linux with a bit of a snooty sniff in his voice. Most people consider Slackware users (like me) to plain old freaks who have too much time on their hands. In the end, all of these distributions are equally as powerful and to most intents and purposes identical; you just do things a bit differently in each case.


The 45-Minute Linux Installation

Alright, its time to take you through a walk-through of a typical Linux installation. Going from booting the installation CD to getting an up and running Linux system complete with the Xfree86 GUI took me about 45 minutes (mind you, I can do this in my sleep at this point...for your first time, set aside a few hours). Ive gone through the procedure with this article in mind so that I could take some pictures along the way. All of the stuff before I installed the Xfree 4.0 GUI system was photographed off the screen with a digital camera, in case you were wondering why the pictures look strange!

As I mentioned before, I am now and always have been a fervent Slackware user. For this installation, I downloaded the ISO CD image of a recent Slackware distribution (Slackware 7.2 beta; you can get the newer 8.0 ISO from ftp.linuxberg.com). I burned this image onto a CDR and I was able to boot it directly upon startup, bypassing the normal Windows 98 startup routines. If you want to follow along with some documentation, there is a very good online book explaining Slackware installation and configuration.

Keep in mind that this walkthrough is NOT a substitute for reading the documentation before you start. Rememberyou should have a pretty good idea of whats going on before you start this, especially with respect to using fdisk and partitioning your hard drive since you dont want to wipe out your existing Windows system!!

So, the first thing you do when you install any distribution is to boot a micro version of Linux, either from a bootable CD or installation disks. You should see something like this:

Booting from the installation CD.

As I mentioned, this is a complete self-contained little Linux system loaded into RAM from the CD. So, in order to install a Linux system onto your hard drive, you have to login as root. In the UNIX world, the root user is God. As root you have complete control over every aspect of your system. With that power comes danger, and you have to be careful what you do as root since you can seriously screw things up if youre not careful. At this point, it doesnt really matter since all were going to do is follow a bunch of prompts to install our system.

Your first login as root.

Once youve logged in as root, the first thing you have to do is partition your hard drive for your Linux system. Some people have elaborate partitioning schemes where they split their filesystem over three or four partitions, including a swap partition. Im lazy, so I usually just setup two partitions: one in which I dump the entire Linux filesystem, and the other which will be a swap partition. The image below shows what my 6 GB Western Digital Caviar drive looks like after Ive partitioned it for Linux:

FDISK: One of the more delicate parts of the Linux installation.

In Linux, every piece of hardware has an associated device file. Hard drives are usually called /dev/hda, /dev/hdb, /dev/hdc, etc. In this case, the hard drive containing my Linux partitions is /dev/hdd. The partitions I just setup are /dev/hdd1 (Linux native filesystem partition; about 6 GB), and /dev/hdd2 (Linux swap partition, about 100 MB). I havent gone through the gory details of how I used FDISK, so please read the instructions on this thoroughly.

Now that Ive setup my partitions using FDISK, Im able to go into the Slackware installation routines by typing setup at the root command prompt. This brings me to the main installation menu as seen here:

Slackware Setup

Some distributions like Redhat and SUSE have flashy X-windows installation GUIs, but Slackware remains a good old text-based installation. I like that because that means that Slackware doesnt make any unnecessary assumptions about my hardware setup at this point. If it were to run the X-windows style screens, it would already be probing my video card and monitor and Id rather do that manually later on. Yes, I am a curmudgeon.

At this point, the installation becomes pretty painless. After letting Slackware install my swap partition and format my native Linux partition, Im ready to install all the software packages on the CD. Once again, Im presented with oodles of menus to choose from:

Package Installation

This is a fairly interactive phase of the installation, and youll spend about 20 minutes going Yes or No to questions about which software packages you want to install. If youve got the hard drive space, Id recommend installing pretty much everything since you never know what you might need down the road.

After the various packages are installed from the CD onto your native Linux partition, you have to do some final configurations. This is still guided by the interactive menuing system. One of the most important things to do is to setup LILO (Linux Loader), which tells Linux the manner in which it will boot itself.

The LILO Boot Loader

You can have an interactive boot menu appear upon booting your system, which will allow you to choose between Windows or Linux, or you can boot Linux off of a boot floppy. I usually go the former route, but when I tried to install LILO in the Master Boot Record of my 20GB Windows hard drive, it wouldnt start properly. Being lazy at this point, I didnt feel like tracking down and solving this problem, so I just made a LILO boot floppy instead.

Finally, the Slackware installation routine gives you a chance to setup the networking features of your computer. This includes setting up modems, ethernet cards, DNS servers, etc., so that once you boot your fresh Linux system youll be pretty much ready to go online. Also, this is where you name your computer...and Im dubbing my rig wolverine:

Computer! I dub thee, 'Wolverine'!

So, thats about it for the installation! Now, to boot our brand spanking new Linux system!! I insert the LILO boot floppy that I made during the installation, and hit reset. The boot routine starts up, and LILO switches control from the floppy to /dev/hdd1, resulting in page upon page of detailed information about my system scrolling by as the system comes alive. Finally, all goes well and Im presented with the boot prompt:

The first real login.

The only user on the system at this point is root. Thats fine for now, since well need root access to setup our X Windowing system. For most routine uses of your system, you will definitely want to setup a normal user account to log yourself into. A non-root user on a UNIX system does not have access to critical system files, such that typing in a potentially disastrous recursive command at the user prompt will not completely wipe out your system like it would as root.

Now were down to the short strokes. Its time to setup XFree86 4.0, our GUI system. In Slackware, theres an XFree configuration script that is easily run by typing xf86config at the root prompt:

The X Windows configuration script.

Along with FDISK, this is a another part of the installation where you have to be really careful. Here youre going to tell Linux about your monitor and video card so that it can run a GUI. Its going to ask about monitor synch rates, and if you dont put this information in properly, you could damage your monitor. That being said, its really just a simple matter of getting the specs from your monitor manual (or off the manufacturers web site) and typing them in at the appropriate prompt:

Setting up your monitor for XFree86.



The second most delicate part of the Linux installation.

Finally, we tell Linux what our video card is. Fortunately, the parameters for my Nvidia GEForce card are already in there, and its just a matter of selecting the right entry:

Video card selection for XFree86.

So, nows the moment of truth. I login to Linux via the user account ppawel that I just setup under root (Slackware has a script for this, just type adduser at the root prompt and itll take you through the process), and type startx -- -bpp 24 to tell Linux to startup XFree86 4.0 in 24bit colour mode. Ive already editted my X configuration file (called .xinitrc) to load KDE, an integrated desktop system that sits on top of XFree86 (which of course, sits on top of the Linux command shell...you are taking notes, arent you?).

So, were all of our configuration efforts in vain? I think not!! Heres the fruits of our labour..a beautiful 24-bit colour KDE desktop that will allow us to do all sorts of groovy stuff like using web browsers and graphics software like the GIMP and BLENDER, office programs like StarOffice, and of course, playing games.

XFree86 running the KDE Desktop

Well, that about wraps it up for now. In the next instalment, Ill show you how to setup your Linux system as a gaming rig, and well take a closer look at getting something like European Air War or EF2000 to run under WINE. Stay tuned!






 Printer Friendly

© 2014 COMBATSIM.COM - All Rights Reserved