I will post this guide in the hope to help the few Linux UT gamers out there enjoy their game even more. In this forum i always found a solution for my Linux problems, except for the one that i finally solved myself, presenting the answer in this guide. So let's start.
You have two options playing UT on Linux:
a) With the Loki port
b) or a in a Wine environment.
I guess nine of ten players would say a) due to this "native is always faster" stuff, as did i in the beginning. But the Loki port is in our case the wrong option, even if Loki's old goals should be honored. Remember the complete Wine title: Wine Is Not an Emulator. And according to UT game performance, this is absolutely true. One thing: I am not talking about WineX, i am no fan of this commercial half closed source stuff which you can't get over here in Germany due to credit card payment - including a function reduced cvs version. No, i am talking about vanilla Wine (my version is 20040505), which handles Unreal Tournament quite perfect (i guess WineX will do it too).
But why the hell should i use Wine? Well, here you get the advantages over the port:
- Keeping backspace pressed in the quick console works.
- Game doesn't crash on map change being spec.
- Demo recording and playback works flawlessly.
- Could connect to pure servers without problems.
- Increased frames on netspeed limitations.
- Colors of the OpenGL renderer look way better.
- And most important: These damned sound problems are gone. I got playback issues on ambient sounds (e.g. Pulse Secondary Fire continues playing even after stop pressing the fire button) with this stone old ALAudio.so and crackled sound with the Generic Audio System.
Sounds good? Wanna give it a try? Okay, here we go:
To let Wine work flawlessly and with no input conflicts you have to start a second "pure" X session with no windowmanager loaded. If you want the maximum performance (or every frame counts due to a slow machine), your X resolution has to fit your game resolution. If your default desktop resolution and game resolution are equal, you can skip the next adjustment. Otherwise (like me, Enlightenment Desktop with 1024x768x16 85 Hertz and Unreal Tournament with 800x600x16 100 Hertz), you have to modify your XF86Config / xorg.conf and add a new server layout. This can be done by duplicating the monitor, device, screen and server layout section, change the identifiers for the duplicates and adjust the game resolution in the second screen section.
xorg.conf example:
Code: Select all
Section "Monitor"
Identifier "Monitor1"
HorizSync 30-100
VertRefresh 50-120
Modeline "640x480_100.00" 43.16 640 680 744 848 480 481 484 509 -HSync +Vsync
Modeline "800x600_100.00" 68.18 800 848 936 1072 600 601 604 636 -HSync +Vsync
Modeline "1024x768_85.00" 94.39 1024 1088 1200 1376 768 769 772 807 -HSync +Vsync
EndSection
Section "Monitor"
Identifier "Monitor2"
HorizSync 30-100
VertRefresh 50-120
Modeline "800x600_100.00" 68.18 800 848 936 1072 600 601 604 636 -HSync +Vsync
EndSection
Section "Device"
Identifier "Nvidia1"
Driver "nvidia"
Option "NoLogo" "1"
EndSection
Section "Device"
Identifier "Nvidia2"
Driver "nvidia"
Option "NoLogo" "1"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Nvidia1"
Monitor "Monitor1"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "1024x768_85.00" "800x600_100.00" "640x480_100.00"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 24
Modes "1024x768_85.00" "800x600_100.00" "640x480_100.00"
ViewPort 0 0
EndSubsection
EndSection
Section "Screen"
Identifier "Screen2"
Device "Nvidia2"
Monitor "Monitor2"
DefaultDepth 16
Subsection "Display"
Depth 16
Modes "800x600_100.00"
ViewPort 0 0
EndSubsection
EndSection
Section "ServerLayout"
Identifier "ServerLayout1"
Screen "Screen1"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSection
Section "ServerLayout"
Identifier "ServerLayout2"
Screen "Screen2"
InputDevice "Mouse1" "CorePointer"
InputDevice "Keyboard1" "CoreKeyboard"
EndSectionAs you can see, ServerLayout2 represents the preferred game settings.
Now it's time to test the second X Server:
Switch to your second console pressing <Ctrl>+<Alt>+<F2> and prompt:
Code: Select all
X -a 1 -gamma 2.5 [-layout ServerLayout2] :1-a 1
This deactivates the mouse acceleration. A 'must-have' for professional aiming.
-gamma 2.5
You want to see your opponents, right?
-layout ServerLayout2
If you have modified your X config file with a second layout, this is the way to use it.
:1
Display on second X Server.
The second server should start, you should only see a desktop with a black / white pattern and your mouse: The perfect gaming environment (i love X!). Maybe you put the above command in a script and call it startx-2 or whatever. You can switch to your first X session pressing <Ctrl>+<Alt>+<F7>, to your second with <Ctrl>+<Alt>+<F8>.
If things work like they should, it's time to install Unreal Tournament. Insert the Game-CD, mount and install it with
Code: Select all
wine Setup.exeftp://ftp.infogrames.net/patches/ut/utpatch436.exe
Code: Select all
wine utpatch436.exeCode: Select all
wine UMODExtractor.exe http://www.badct.de/dlredir.php3?id=1193&type=file
Copy the OpenGLDrv.dll from the archive into your Unreal Tournament/System directory. Now we adjust the UnrealTournament.ini.
A very important aspect is to set
Code: Select all
[Engine.Engine]
GameRenderDevice=OpenGLDrv.OpenGLRenderDevice Code: Select all
UseDirectInput=False Code: Select all
[WinDrv.WindowsClient]
WindowedViewportX=640
WindowedViewportY=480
WindowedColorBits=16
FullscreenViewportX=800
FullscreenViewportY=600
FullscreenColorBits=16
Brightness=1.000000
MipFactor=1.000000
UseDirectDraw=True
UseJoystick=False
CaptureMouse=True
StartupFullscreen=True
CurvedSurfaces=False
LowDetailTextures=True
ScreenFlashes=False
NoLighting=False
SlowVideoBuffering=True
DeadZoneXYZ=True
DeadZoneRUV=False
InvertVertical=False
ScaleXYZ=1000.000000
ScaleRUV=2000.000000
MinDesiredFrameRate=999.000000
Decals=False
NoDynamicLights=True
UseDirectInput=False
ParticleDensity=0
NoFractalAnim=True
SkinDetail=High
TextureDetail=Low
[OpenGLDrv.OpenGLRenderDevice]
UseTNT=False
UseGammaExtension=False
UseModulatedGamma=False
UseS3TC=False
MinDepthBits=16
MaxLogUOverV=8
MaxLogVOverU=8
UseMultiTexture=True
UsePalette=True
UseAlphaPalette=False
ShareLists=False
AlwaysMipmap=False
DoPrecache=False
Translucency=False
VolumetricLighting=False
ShinySurfaces=False
Coronas=False
HighDetailActors=False
DetailTextures=False
UseTrilinear=False Here is the more or less important part of my Wine config file, if you have problems:
Code: Select all
[x11drv]
"AllocSystemColors" = "100"
"PrivateColorMap" = "N"
"PerfectGraphics" = "N"
"Display" = ":1.0"
"Managed" = "N"
"UseDGA" = "Y"
"UseXShm" = "Y"
"DXGrab" = "Y"
"DesktopDoubleBuffered" = "Y"
"TextCP" = "0"
"Synchronous" = "N"Code: Select all
export DISPLAY=:1Code: Select all
wine UnrealTournament.exe (Note: Do NEVER start the game with
Code: Select all
wine /path/to/unreal/tournament/system/directory/UnrealTournament.exeNow switch with <Ctrl>+<Alt>+<F8> to the game, select the OpenGL Renderer (if the Startup Screen shows up) and enjoy.
Some statistics (my machine is an Athlon XP 3000+ with 512 MB DDR RAM, NVIDIA GeForce4 TI4200, SoundBlaster LIVE! and NForce2 chipset, running kernel 2.6.7-mm4):
- DM-Deck16][ flyby 230 to 1180 fps (average about 400).
- DM-Deck16][ 16 player bot match in no situation below 100 fps.
- With ISDN Netspeed 6500 online always 110 fps.
Unreal Tournament Windows - Linux Comparison:
- Graphic: UT is heavily CPU bound. While running a second X Server without windowmanager and no background programs, Linux outperforms a perfectly optimized Windows by about 10-30 frames per second on my machine.
- Audio: Wine flawlessly controls the Windows DirectSound library, Windows and Linux are quite equal(in Linux you can drop the Latency to 20, in Windows 2000 you have to increase it to 60 to avoid scratched sound). There may be a difference on a 5.1 system, but i have none.
- Input: You have to get used to the Linux mouse handling, but it's way more precise then Windows. Try it out (proud owner of a Microsoft IntelliMouse Explorer 3.0 and Natural Keyboard, Microsoft hardware rocks!): Repeat a circle movement with your crosshair, the circle should be as small as possible - the Linux circle is much smoother (by same sensitivity according to field of view rotation).
- Network: The Windows ping of my ISDN AVM Fritz!Card PCI is on millisecond exact the same like with Linux, using pppd and the capi interface.
Well, that against the common sentence "Linux is no gaming platform".
Now the solution to an important UT Problem, concerning Single Player:
The game is way too fast on modern machines.
You can do a very nice workaround by starting a server with
Code: Select all
wine ucc server [mapname]Code: Select all
open 127.0.0.1:7777 You should set the NetServerMaxTickrate and LanServerMaxTickrate in the UnrealTournament.ini [IpDrv.TcpNetDriver] for your server to at least 35, to get a smooth gaming experience.
Hint: If you want to train offline or play a warmup with internet conditions, you can start the server with
Code: Select all
wine ucc server [mapname]?PktLag=XOkay folks, that's it. We're done. Several aspects of this guide can be transfered to every other game and i hope at least some of you can take use out of it. With Unreal Tournament now working flawlessly on Linux, Doom3 can come.
See ya on battlefield.
void




