Click to See Complete Forum and Search --> : Getting Windows games working in 3d on Linux


jansolo
11-22-2001, 06:26 AM
Okay, I was wondering if anyone would be interested in a little thing I wrote up on how to get OpenGL working with Mandrake/nVidia based cards. I also go into a little bit about getting Half Life working with WineX. It is pretty straight forward, so I did not want to waste anyone's time if this one of those "been there, done that" or just too lame to be worthy posts. So, if anyone wants me to, I can post it here. It is pretty non technical and pretty straight forward.

Would anyone be interested in this topic?

X_console
11-22-2001, 06:31 AM
Do it. That's what this forum is for. :)

jansolo
11-22-2001, 06:54 AM
How I Got Gaming Working on Linux

A Brief NonTechnical Walkthrough


by JanSolo
Christ01.AT.yahoo.com


I assume a couple of things:

1. Your sound works.
2. You are using an nVidia graphics card.
3. You can boot into Linux (I use the ultra user friendly Mandrake 8.1 - so a
lot of work has been done for you. This will work for other RPM based
distributions, of course, except maybe SuSe).

The first part, in my opinion, of making Linux ready for proper gaming is to get
3d acceleration working, courtesy of OpenGL and the nVidia drivers. So, before
you do any of this, go to the nVidia web site (www.nvidia.com) and download the
latest and greatest drivers for your distro (see step 1 below for the specific files). After you have done this, it is time to get
cracking!


Getting 3d Acceleration Working With Mandrake 8.1 (or RedHat)


1. Go to www.nvidia.com (http://www.nvidia.com) and get two files: NVIDIA_GLX-1.0-1541.i386.rpm &
NVIDIA_kernel-1.0-1541.src.rpm. Put them somewhere easily accessible. Now, for
the installation ..

2. Reboot Linux. We do not want to boot into X, so if you are using
LILO, just type in this when you see the LILO prompt: linux 3. Hit return.

3. When you get to the login prompt, login as root.

4. Find your recently downloaded nVidia files.

5. Since I assume you are running Mandrake 8.1, you are going to have to rebuild
your NVIDIA_kernel-1.0-1541.src.rpm. To do this, type in: rpm --rebuild
NVIDIA_kernel-1.0-1541.src.rpm. Give it a minute or so to do this. After it is
done, you will see some results with a pointer to a location. My newly rebuilt
NVIDIA_kernel-1.0-1541.src.rpm was located in /usr/src/RPM/RPMS/i686. Just a sidenote: in theory the PowerPack Edition of Mandrake can do this, but it has failed to get this working properly (it failed to patch the kernel) each time I tried to install it. Just a word of warning.

6. Now that you have moved to that directory, time to actually install the newly
built RPM. Type in this: rpm -ivh i686NVIDIA_kernel-1.0-1541.i686.rpm (or
whatever the rebuilt RPM is called).

7. Afer this has completed, it is now time to install the NVIDIA_GLX.i386.rpm.
This is easy as well. Type in rpm -ivh NVIDIA_GLX.i386.rpm.

8. After this has completed, time to reboot. If you do not know how to do this,
please do some more reading (or just hit control, alt and delete you lazy ***.)

9. Almost done. Again, we want to log into Linux without starting XWindows.
So, once again, type in linux 3 to start without XWindows loading. Again, you
will need to log in as root.

10. Now, time to do some editing. Start up your favorite text editing tool such as Vi and go to /etc/X11 and look for XF86Config-4.

11. Open up this file and look for the "Graphics Device Section". Then look for
the section where it says Driver. It should say "nv". Replace this with "nvidia".

12. Now, move up and look for Module Section and put in this line: Load "glx"

13. Save, close and reboot. If there is another way to get it all working with out rebooting, please let me know.

14. Boot into Linux normally with XWindows started. After this, you can test
out to see if OpenGL works in a variety of ways: Mandrake 8.1 ships with some
OpenGl based screen savers such as pipes, so this could be a fine test. Also,
you could try out TuxRacer if you installed that. And, of course, installing a
game such as Loki Games Quake 3 Arena port would be an excellent test. If you would prefer, just skip down to the next steps as they will provide a great way to test if OpenGL is working or otherwise. Anyhow, if any of the above work, good job! You have just passed the toughest hurdle.


Getting Windows Games to Work on Linux

This is actually pretty easy as long you are a patient person. If you are not,
I suggest you stick with software from Loki Games. They make some excellent
ports that will run better than using the solution below. I own quite a few
games from them and am more than happy with their work. Now that I am done with
my plug for Loki, please read on.

1. The first step is to obtain WineX. This can be downloaded in RPM format (for a price in $$) from www.transgaming.com. (http://www.transgaming.com.) Otherwise, download the source and compile it. I will assume that you use the RPM based version of WineX.

2. Once you have successfully paid for and downloaded WineX, time to install it. Go to a command shell and su to root. From there, type in rpm -ivh winex-1.0-1.i386.rpm (or whatever the name of the RPM is you downloaded from their site).

3. Once WineX is installed, time to install your games. Please note: all of the newly installed games are going to be located in your home directory unless otherwise specified in the config file for WineX. Some games, such as Diablo 2 can take quite a bit of room (2gigs for Diablo 2 full install with expansion). Of course, with the size of modern hard drives, but this is just warning for those with smaller drives and/or a very little disk space.

4. Depending on your security level, you can theoretically log out of the root account.

5. Insert a game cd into your cdrom (Half Life for instance).

6. Cd to /mnt/cdrom and type in winex setup.exe.

7. From here, perform the normal installation for Half Life. By the way, I find that using the Sierra update utility to be an exercise in extreme time disposal
(ie: a waste of time). So, you may find it easier to just download the newest patch from a site (www.bluesnews.com or www.planethalflife.com). (http://www.planethalflife.com).)

8. Install the patch (type in winex followed by the name of the patch name, for
instance winex HL1108.exe).

9. Now, we are still not ready to play Half Life. We now have to tell WineX to tell all games that it is Windows98. The this is done is to add the following line in your /usr/bin/winex config file. Fire up an editor and look for this line: RUNWINE="$INSTALLDIR/winex/bin/wine -debugmsg
-all --". Add this line: --winver win98. It should now look like this:
RUNWINE="$INSTALLDIR/winex/bin/wine --winver win98 -debugmsg -all --" Conversly, Transgaming has recently released a new WineX script that is placed in /usr/bin that does the aforementioned step for you. Read their site for more info on that.

10. After it has patched and the winex config file updated, time to play the
game. Go to your C drive (mine is located in /home/jan/.transgaming/c_drive/ and with a symlink in my home directory that looks like Transgaming_Drive) and then proceed into your SIERRA directory, then to the Half Life directory. Type in winex hl.exe.

11. Watch it load. Now, you might get stuck or it may appear that the first screen appears and is garbled. Just moved your mouse to the lower right (out of the Half Life sceen) and you should see Linux complaining. Just click OK twice.

12. Welcome to Half Life on Linux. You may notice that sound is laggy. For instance, when I was playing a sniper, I noticed that I would fire, deanimate my opponent and then actually hear the shot I made followed by their demise sound. TransGaming.com's support has some suggestions, but I have not found any of them to remedy the issue. If you have any ideas, please let me know.


This is basically the step you will have to follow for installing most games on
Linux. Some games, I have noticed, will not install. For instance, Diablo 2
would not install for me, so I simply dragged it from my Windows mount and
copied it into my Linux C Drive. Look to Transgaming's site for more information on what games work and do not.

This method for installing and playing games should work for most people. If it does not, then go to www.transgaming.com (http://www.transgaming.com) for support and information on what games work and otherwise.

If you have any other questions pertaining to this document, just ask and I will try to help as best I can.
email: christ01.AT.yahoo.com

z0mbix
11-22-2001, 10:00 AM
You shouldn't need to do any rebooting especially after just installing an rpm and editing you XF86Config-4 file. ;)

Jomboni
11-22-2001, 12:24 PM
Yeah, I installed the new nvidia drivers and edited the XF86Config-4 file all from within X, and even after that I didn't reboot, I just restarted X. Not that there's anything wrong with rebooting, but it takes a lot more time and isn't really necessary for this.

nathaniel
11-23-2001, 12:17 AM
11. Open up this file and look for the "Graphics Device Section". Then look for
the section where it says Driver. It should say "nv". Replace this with "nvidia".

I would also include the line belive following the same format:

Option NVagp "2"

This will try and load the Nvidia's agp module and if it fails, then it will load fx86's agp module, otherwise in some of the older Nvidia drivers, it just fails to no AGP instead causing HL to say you do not have open-gl video card or it is not supported.

Also where's your wine.conf editing? I usually dl www.codeweavers.com's (http://www.codeweavers.com's) binary of wine before hand install it and run winesetup, create the wine.cfg and then remove the rpm. I also just copy my windows directory into like /usr/local/win and during the wizard setup tell it to use an existing windows directory and it is in /usr/local/win (the root directory) so certain applications dll are there and when I check the autodetection of my drives I make my windows c drive be the wine c dir so all my applications don't need to be reinstalled

just a long confussing thought

NB

jansolo
11-23-2001, 04:06 AM
Thanks for the tips on X.

Also, I did not use Wine from Codeweavers. I actually used WineX from Transgaming Technologies.

ScRapZ_1
12-03-2001, 09:13 AM
DAMMIT! Theres no smilie face suitable for what I'm about to say...

I love you man! I've tried many how-tos on getting 3d games in Linux.... but all have failed, this one worked! No I mean it, I LOVE YOU MAN!

Finally.... games in Linux. Quake3 in Linux... woohoo! There goes my windoze partition. I'm through.

(PS: I think it was the 'XF86Config-4 file that got me going. It was never that file in any of the other how-tos)

TTFN,
ScRapZ_1 :D :cool: :D

Icarus
12-03-2001, 09:48 PM
Hmmm...wonder how this will work on RedHat 7.2? I just installed the codeweavers wine so that is started...

David Dorward
12-04-2001, 06:13 AM
Originally posted by ScRapZ_1:
<STRONG>Quake3 in Linux... woohoo!</STRONG>

Ah... but you don't need WINE for that. A Quake 3 CD and a Linux binaries download and you can have Q3A running native!

At the time of writing, the top news item on the Q3 website is a new release for the three supported platforms: http://www.quake3arena.com/

ScRapZ_1
12-04-2001, 06:23 AM
Well, I've got a Quake3 demo which came with one of my Linux distros (Book, RedHat install cd's and the 'Ultimate Linux CD' which had, among other things, a Quake3 demo!) and the bloody thing worked.

So now Im getting serious about getting games on. I know theres Linux binaries for this kind of thing, but not all games. Wine will prolly just be the best option for now...

TTFN,
ScRapZ_1 :p

M8ram
12-04-2001, 10:58 AM
Hi jansolo thanks fot the info,

just a quick question about the nvidia drivers though.

I have installed RH7.2 on the network of my university (I am a student there).

Would I need to do that --rebuild thingy? What does that do? Where can I get more info on that?


Thanks a lot!

Taizong
12-10-2001, 03:01 PM
If using redhat or mandrake just goto Nvidia's driver download page for linux. They have rpm packages for glx and the drivers ready to go.

Siskmarek
12-11-2001, 04:04 PM
Which really works for me because source rpms don't seem to work on my system. I type in rpm --rebuild x.rpm and it tells me that x.rpm doesn't exist, when it's right there!

Very frustrating.

The sound issue is kinda funny. I solved it by just grabbing the latest CVS snapshot of WineX, compiled it, and everything was fine.

~ Siskie

dvdnut
12-12-2001, 10:50 AM
how i got them working in 8.1

d'l the kernel and glx files in SRC format, well actually get the 7.2 version of glx in rpm

compile the kernel file, then install the rpm, do the changes on xf86config-4, reboot, restart X whatever you prefer and hey presto, splash screen and opengl!

d

Danrak
12-18-2001, 11:02 AM
Do you think I could use your article on my site ( http://www.ezdrivers.com ) I would be willing to give you a resource box at the end with a small bio, and link to your site (if you have one) and copyright if you wish.

Joeri Sebrechts
12-20-2001, 08:04 AM
For all people with G400's or other recent G series matrox cards. You don't need to install any drivers to get opengl going, since in contrast with nvidia it's built into X), but it HAS been my experience (with the G400) that acceleration only works in 16-bit colour mode.

So you'll either have to edit your XF86Config-4 file to run in 16bit, or have to start your X with "startx -- -depth 16"