Check out Half-Life Re-imagined competition results!
Check out Skewing textures in Hammer, our newest tutorial!
Welcome, Dr.Cola, our newest member!

logo

Site Stuff

Reference

Maps

Community

ShoutBOX

Poll

Feeling Blue

What's your favourite shade of blue?

Azure

13

Cobalt

30

Turquoise

8

Cyan

10

Royal

6

Teal

3

Onliners

3 mins

Screamernail

26 mins

Suparsonik

27 mins

Solokiller

28 mins

Striker

36 mins

Admer456

1 hours

JeffMOD

1 hours

Dr. Orange

Affiliates

A gaming and technology blog by TWHL admins Penguinboy and Ant. A music blog by TWHL users Ant and Hugh.

Linux Half-Life Mapping

By Randall 'slightcrazed' Walls

This tutorial was done on a stock Slackware 9.1 install running Kernel 2.4.22, Wine version 20030911 and a GeForce3 ti200 running the latest Nvidia drivers from Nvidia.com.

Wine is used rather than WineX. I prefer Wine over WineX - this is more for philosophical reasons which I won't get into here. I assume that WineX works, but I make no guarantees. Please comment with your experiences.

I am a mapper from way back (Quake 1) and mapping (specificially for Half-Life and CS) has been the one thing that has mandated that I keep a working Windows install on my system. Hammer to my knowledge, does not run on Linux, period. Even with WineX 3.1 and the latest Wine CVS, I have never been able to make it work.[However, QuArk (Quake Army Knife) does works on Linux, and QuArk handles Half-Life mapping quite nicely.

As far as I know, a "Half-Life Linux Mapping How-To" does not yet exist. I am sure that I am not the first person to map on Linux, but if that's the case then no one else has taken the time to list the steps necessary. I figured I'd throw this out there in the hope it will help a few people.

frame

I. Get Wine with OpenGL support

Wine (Wine Is Not an Emulator) is a nifty bit of programming that allows for Windows binaries to run on a Linux/Unix platform through the use of a compatibility layer. This extra layer of programming lies between the binaries and the operating system, and it 'tricks' the executable into thinking it is running on a Windows machine. If you don't have Wine, you'll need to obtain it from www.winehq.com. I used Wine release 20030911, but any of the newer versions will work. Wine release 20031118 is the most recent version at the time of this writing. Of course, you will need Wine to be compiled with OpenGL support, both for QuArk to display the OpenGL 3D window, and for Half-Life to run at all. This article at Linuxgames.com is the best I know of for compiling Wine with OpenGL support, and I am not going to take the time to re-write what has already been written. The article also explains how to install Half-Life, but that should be pretty straight forward once Wine is installed. For mods like CS that require Steam, Overflowed has written this article.

II. Get QuArK and Python

After following the above steps, you should have a working Wine install with OpenGL compiled and functioning, and Half-life running satisfactorily. There are many versions of QuArk available, and most if not all will work with Wine. The one issue is that versions are available with an installer (.exe), or as a snapshot (.zip). The installer that comes with QuArk 6.4.0 alpha 1 and alpha 2 does not work with Wine. The snapshots are simply a zipped up copy of the QuArk file tree, and these work perfectly. Some older version of QuArk will work as well. I have included instructions for several versions of QuArk, if you have problems with one, try another.

  • QuArK Version 6.3.0 requires Python 1.5.x. If you wish to install this version, you must first install Python. Ignore the link given on the QuArk Download page for the minipy1.5b.exe. The installer used for minipy1.5b.exe is incompatible with Wine, and will not install correctly. You'll need the full Python libraries available at www.python.org. The version to download is Python 1.5.2, and the Windows installer is available here.


  • QuArk Versions 6.4.0 Alpha 1 and Alpha 2 come bundled with Python 2.2.3, so no additional downloads are needed


  • III. Install Python (only needed for version 6.3.0)

    From within a terminal, cd to the directory you saved the file to, and then run the installer:

    cd /directory/to/python
    wine py152.exe

    The install should be straight-forward; The only malfunction was that my gnome-terminal went "beserk" (random numbers/letters scrolling across the screen uncontrollably) when the install finished. This is a common issue with Wine and certain versions of install shield, but this should not affect the actual install process.

    IV. Install QuArK

  • Installing QuArk 6.3.0


  • Download the file from here. From within a terminal, cd to the directory that you saved the file to and run the installer:

    cd /path/to/quark
    wine quark_v6.3.0.EXE

    The QuArK installation will start. I had no problems at all here, and the install is very straight forward.

  • Installing QuArk 6.4.0 Alpha 1 or Alpha 2


  • Download the snapshots for alpha 1 or alpha 2.

    From within a terminal, unzip the file in the desired location:

    unzip quark-win32-20031122.zip

    You can put the file tree anywhere you want, but it is probably easiest to place it in your wine 'C' drive.

    V. Running QuArK

    A note regarding running QuArk. The only way I am able to run QuArk and have it function correctly is to cd into the install directory in a terminal and run the executables by hand.

    Example: My Wine directories are located in my /home folder under Wine.
    To run QuArk:

    cd /home/slight/Wine/C/QuArk\ 6.3/
    wine QuArk.exe

    This is the case with many applications run under wine. Wally will need to be run this way as well. You did download Wally, didn't you?

    VI. Compiling a Map

  • Once QuArK is up and running, I would suggest downloading and installing Zoner's Half-Life tools. This will give you 4 files needed for map compiling: hlcsg.exe, hlbsp.exe, hlvis.exe, and hlrad.exe. Throw all of these files in the same directory where you put QuArK, and then modify QuArK's settings to point to the files for compilation. They should be listed in the order that I have them listed above (i.e, CSG runs, then BSP, then VIS, and finally RAD).

    Check the QuArK website for documentation on setting up your compile and general mapping options and storage directories. For those of you familiar with Hammer or Worldcraft, this should seem pretty straight forward.


  • I did have to slightly modify the default setup, as for one reason or another when you run the GO! (textures+build+Half-Life) option under the Half-Life menu it will only run CSG. So you have to run the BSP, VIS, and RAD portions manually.

    From within a map in QuArk, click on Half-Life then the Customize menu. Click on the GO! (textures+build+half-life) option and uncheck all of the build tools except for hlcsg.exe (1st tool). Next, click on the &QBSP (BSP file creation) option, and uncheck hlcsg.exe (1st tool), and leave it so that only the hlbsp.exe (2nd tool) is checked. Double check that the &VIS (Visibility list) option only has the hlvis.exe (3rd tool) checked, and that the &LIGHT (light projection) option only has hlrad.exe (4th tool checked.

    Now, when you need to compile a map all you do is click on the GO! (textures+build+Half-Life) button under the Half-Life menu, and this will run hlcsg.exe. Then click on the &BSP button to build the BSP file, and then do VIS and light (RAD) and you should end up with a working yourmap.bsp in whatever directory you specified in QuArk's main options. It would, of course, be possible to use a scripting language to automate this process further.


  • VII. Conclusion

    This should be enough to get you up and running. If OpenGL support for Wine compiled correctly then all the mapping tools along with the OpenGL 3D window should function normally. As with any application run under wine the application may exhibit odd behaviour from time to time, although QuArk has run as smooth for me under wine as it does under windows.

    Of course, what article would be complete without a screenshot of some nice Half-Life Linux mapping action?

    Click to view full image.