Skip to content

Instantly share code, notes, and snippets.

@soifou
Last active March 7, 2024 12:26
Show Gist options
  • Save soifou/e863b978d1f01e33691b to your computer and use it in GitHub Desktop.
Save soifou/e863b978d1f01e33691b to your computer and use it in GitHub Desktop.
Install Unreal Tournament GOTY on Debian Jessie 64bits

Install Unreal Tournament GOTY on Debian 64bits

Run natively Unreal Tournament Game Of The Year (GOTY) on Debian system.

UT is not dead! The install process is a bit cumbersome but the game has been published more than 20 years ago! Please let me know how it went for you and if you have any tips, please share :)

And most important, have fun!

(Tested on Debian Bullseye 64bits)

Requirements

  • Two ISO physical discs (or ISOs) of Unreal Tournament GOTY (v436)

Dependencies

The game runs in 32bits, we need to install some minimal 32 bits packages in order to run install script and the game itself:

$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install libx11-6:i386 libxext6:i386 libc6:i386

Note: Package libc6:i386 may not be mandatory after all. In my case, the game run ok without it.

For the sound, I used to use another hackish method with padsp32 but recently tried Open Sound System (OSS) and it works great. Install it and start the proxy daemon:

$ sudo apt install osspd osspd-pulseaudio
$ sudo systemctl start osspd.service

Grab the Loki installer named ut-install-436-goty somewhere (DuckDuckGo it if the link below is dead):

$ curl -O https://princessleia.com/tools/ut/ut-install-436-goty.run

NOTE: Another installer named ut-install-436-multilanguage-goty exists but it has a GTK graphical install with obsolete dependencies... Boring and useless!

Tweak the installer

Once downloaded, uncompress the installer. We need to modify 2 shell scripts to fake our 64bits architecture.

$ sudo ./ut-install-436-goty.run --keep
$ cd ut-436-GOTY/

Edit both ./setup.sh and ./setup.data/apply-patch.sh and replace function named DetectARCH() by this one:

DetectARCH() 
{
    echo "x86"
    return 0
}

Save both files. We can now start the install process.

Installation

Launch installer script, answer yes (or simply hit ENTER) to all questions except the first one:

$ sudo ./setup.sh
----====== Unreal Tournament GOTY installation program ======----
You are running a x86 machine with libc5
Hit Control-C anytime to cancel this installation program.
Would you like to read the README file ? [Y/n] n
Please enter the installation path [/usr/local/games/ut]
Do you want to install symbolic links to a directory in your path? [Y/n]
Please enter the path in which to create the symbolic links [/usr/local/bin]
Install Binary Files? [Y/n/?]
Install OpenGL as default renderer? [Y/n]
Install Data Files? [Y/n]
Do you want to install desktop items? [Y/n]
Installing to /usr/local/games/ut
10945 MB available, 668 MB will be installed.
Continue install? [Y/n]
Installing ut binary ...
 100% - /usr/local/games/ut/ut
Installing ucc binary ...
 100% - /usr/local/games/ut/ucc
Installing Binary Files ...
...
Please mount the Disc One CDROM.

The script hangs until you mount 1st disc, spawn a new term and mount it:

$ sudo mount -o loop /path/to/ut-1.iso /media/cdrom0

Back to the installer, answer yes, it will copy a bunch of files and hangs again for 2d disc:

Choose Yes to retry, No to cancel [N/y] y
Installing Data Files ...
...
Please mount the Disc Two CDROM.
Choose Yes to retry, No to cancel [N/y] 

Unmount the previous, mount the new one and answer yes:

$ sudo umount /media/cdrom0
$ sudo mount -o loop /path/to/ut-2.iso /media/cdrom

After copying the needed files it will finish by patching some others and decompressing all the maps found in /usr/local/games/ut/Maps/. This can take a while.

stage 0: 0.073435 secs
stage 1: 0.044184 secs
stage 2: 0.087546 secs
stage 3: 0.032729 secs
stage 4: 0.091152 secs
Total: 0.329047 secs
Decompressed ../Maps/AS-Frigate.unr.uz -> AS-Frigate.unr
WARNING: Not using preference directory
stage 0: 0.052972 secs
stage 1: 0.030028 secs
stage 2: 0.063270 secs
stage 3: 0.022275 secs
stage 4: 0.059120 secs
Total: 0.227666 secs
Decompressed ../Maps/AS-Guardia.unr.uz -> AS-Guardia.unr

Finally answer no to the last question, we don't want to run the game as root:

Installation complete.
Would you like to launch the game now? [Y/n] n

Unmount the second disk:

$ sudo umount /media/cdrom0

Then start the game with your current user. It'll create your loki userdir and probably abort because of OpenGL:

$ ut
Creating preferences directory...
Creating directory /home/user/.loki/ut/
Creating directory /home/user/.loki/ut/System
...
binding libGL.so.1
appError called:
Could not load OpenGL library
Executing UObject::StaticShutdownAfterError
Executing USDLClient::ShutdownAfterError
Executing USDLViewport::ShutdownAfterError
USDLGLRenderDevice::ShutdownAfterError
Signal: SIGIOT [iot trap]
Aborting.
Exiting.
Name subsystem shut down

Post configuration

Edit the new config file located at ~/.loki/ut/System/UnrealTournament.ini.

Set UT Engine to SDL instead of OpenGL. The graphics are quite decent with it. With OpenGL this will be probably better but you need additional dependencies and a lot of hassle to get things working correctly.

Check the package libsdl2-2.0-0 is installed on your system.

In section [Engine.Engine], change the render device to SDLSoftDrv.SDLSoftwareRenderDevice :

[Engine.Engine]
GameRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice
WindowedRenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice
RenderDevice=SDLSoftDrv.SDLSoftwareRenderDevice

On the same section, change the sound engine GenericAudioSubsystem and to get a better sound experience, on the dedicated section [Audio.GenericAudioSubsystem] set the surround mode to on:

[Engine.Engine]
AudioDevice=Audio.GenericAudioSubsystem
...
[Audio.GenericAudioSubsystem]
UseSurround=True

You can now run and enjoy the game:

$ ut

Advanced steps

Here the key folders/files you need to know:

  • System directory : /usr/local/games/ut
  • Default game settings: /usr/local/games/ut/System/UnrealTournament.ini
  • Default maps dir: /usr/local/games/ut/Maps
  • User directory : ~/.loki/ut
  • User maps dir: ~/.loki/ut/Maps
  • Game settings : ~/.loki/ut/System/UnrealTournament.ini
  • Player settings (keybinds, player name): ~/.loki/ut/System/User.ini
  • Log file: ~/.loki/ut/System/UnrealTournament.log

Additionals configuration

Change screen resolution in fullscreen mode (adapt with your spec)

[SDLDrv.SDLClient]
FullscreenViewportX=1280
FullscreenViewportY=1024
FullscreenColorBits=16

Increase the default value of allocated RAM

[Engine.GameEngine]
CacheSizeMegs=64

Fix crash on online map transition

[Engine.GameInfo]
bWorldLog=False

Unpack UT Bonus Pack 4

Bonus pack 1, 2 and 3 are already packaged in UT GOTY. Only bonus pack 4 is needed:

$ curl -O http://www.deepsky.com/~misaka/scripts/umodunpack.pl
$ curl -O http://downloads.unrealadmin.org/UnrealTournament/BonusPack/utbonuspack4.umod
$ chmod +x umodunpack.pl
$ sudo ./umodunpack.pl -u utbonuspack4.umod -b /usr/local/games/ut
or in your user dir
$ ./umodunpack.pl -u utbonuspack4.umod -b ~/.loki/ut

Multiplayer Online

To play online, some maps require you install a DLC downloader named NPLoader:

$ curl -O http://utgl.unrealadmin.org/NPLoader/v16b/Linux.tar.gz
$ tar -zxvf Linux.tar.gz
$ rm -f Linux.tar.gz
$ sudo mv NPLoaderLL_v16b.* /usr/local/games/ut/System/

While looking at http://utgl.unrealadmin.org/NPLoader/, there are more recent versions. I did not yet tested them though.

Unclutter your home

Assuming you have a working installation, move ~/.loki to ~/.local/share or whatever your XDG_DATA_HOME is.

$ mv ~/.loki ~/.local/share

Then change default ut startup script located in /usr/local/games/ut/ut by this one:

#!/usr/bin/env sh

# Unreal Tournament startup script

LOKI_PATH="${XDG_DATA_HOME:-~/.local/share}"/.loki
mkdir -p "$LOKI_PATH" "$LOKI_PATH"/ut/System
UT_DATA_PATH=/usr/local/games/ut/System
# Let's boogie!
if [ -x "${UT_DATA_PATH}/ut-bin" ]; then
    cd "${UT_DATA_PATH}/"
    HOME="${XDG_DATA_HOME:-~/.local/share}" exec "./ut-bin" $* -log
fi

Apart some code refactoring, the main trick here is to fake our home folder location when starting the game.

References

@kanchudeep
Copy link

I minor suggestion, instead of /usr/bin/padsp, save the changes to a new /usr/bin/padsp-i386?

@alfonz19
Copy link

Please would be be so kind and update this info a little? I'd love to play this after so many years, BUT! the liflg.org was moved to github, and nothin you describe here match. No information/documentation there seems to be relevant

@soifou
Copy link
Author

soifou commented Feb 19, 2020

@alfonz19

You are absolutely right, this guide deserved an update so here you go! Good luck!

@alfonz19
Copy link

aha, so "here I go"! I left opensource world 3 years ago, so I did not see this kind of phrases for a while. Definitely refreshing, and opens up some unheal wounds and shitty memories of my decade in opensource world. The idea, that any newcomer can come to undermaintained and obsoleted project full of mess, with zero skills (in this area) and guidance, is just silly and unrealistic. If someone asks for help regarding to "your" project, you can help him to get work done together, but typical "Patches are welcome" is like saying "fuck you", just politely, because namely you don't want to work on it. But there is really nothing wrong with deleting obsoleted sw, deleting outdated/unmaintained repos or pages, or even with saying: "I don't care", "I won't help you, I don't have time for this shit". You can be honest.

To wrap up: I found this "how to" duplicated on multiple places, thus I doubt that it's even your work, which might be the main cause you cannot update it. It's severely outdated and deserves deletion just like whole lifl, because of it's unmaintained state and messy state. What the point of your page if it's completely outdated, with dead links and cannot be used at all and you don't want to touch it?

solution: we have powerfull computers nowadays. We don't need this at all to run natively, as it runs flawlessly under wine. I could have help you with your guide to get it back to current status and update this page. Instead you repulsed me by "fuck you, do it yourself!", I used wine, and your pointless page can live on, serving no use at all.

@soifou
Copy link
Author

soifou commented Feb 20, 2020

@alfonz19

I certainly did not want to be aggressive and you completely misunderstood my point here... check the guide again,

I heard your request, I care and rewrote it entirely with some fresh links, what dependencies you need, where to download the needed scripts, etc...

Opensource world is full of surprises. Peace!

@alfonz19
Copy link

I beg your pardon. Definitely my mistake. I misread your answer, and my brain stopped working, evidently.

@danielbrownridge
Copy link

Hi @soifu This is an odd one but on Ubuntu 18.04 I hit a snag:
`root@mymachine:/home/daniel/ut/ut-436-GOTY# bash setup.sh
----====== Unreal Tournament GOTY installation program ======----

You are running a x86 machine with libc5
Hit Control-C anytime to cancel this installation program.

Would you like to read the /home/daniel/ut/ut-436-GOTY/README file ? [Y/n] n
Please enter the installation path [/usr/local/games/ut]
No write permission to /usr/local/games
`

I've tried installing to current directory and so on and in call cases get the No write permissions issue. Any ideas?

I'm now installed the outdated libs and trying the GTK based installer you advised against ...

@soifou
Copy link
Author

soifou commented Apr 7, 2020

Hey @danielbrownridge that's strange, never got permissions issue !

Maybe try to install with your current user (with sudo permissions) instead and run the script without bash : sudo ./setup.sh like I did ?

@danielbrownridge
Copy link

I think 'bash' may be the issue actually. I ran into another issue with an unrelated script and was reminded of the fact that the default shell on Ubuntu is now dash and not bash so scripts that have #! /bin/sh will run under dash by default which has some minor but significant variations. Changing the first line of the script to#! /bin/bash worked to fix another script I was having trouble with. The gtk install got UT installed for me though so I'm not going to test it out on the ut-install-436-goty.run script now. Only thing remaining for me now is getting sound working I think.

@CGarces
Copy link

CGarces commented Apr 26, 2020

There is a typo error? DetectARCH should be DetectARCH?

Same problem as @danielbrownridge no audio.

How you solve it?

The logs onlt show:

Bound to Audio.so
Failed to open audio device.
Audio initialization failed.

@soifou
Copy link
Author

soifou commented Apr 27, 2020

@CGarces,

I did not change the function name, only the content (by echoing an "x86" string).

For the audio, the sound engine must be set to AudioDevice=Audio.GenericAudioSubsystem but if osspd does not work for you (did you start the service?) maybe you can try the old method with paspd:
https://gist.github.com/soifou/e863b978d1f01e33691b/bd8a01fac9decbb4a7dda70344087386fb06bcfb#no-sound

@CGarces
Copy link

CGarces commented Apr 27, 2020

@CGarces,

I did not change the function name, only the content (by echoing an "x86" string).

Yes, you change it.

DetechARCH() 
{
    echo "x86"
    return 0
}

Must be DetectARCH not DetechARCH.

Sound is working fine... after reboot the system. I use a system without pulseaudio so I assume that the reboot was needed by some dependency on that corner cases that pulseaudio not was previously installed.
will try with alsa-oss or osspd-alsa but I confirm that your instructions works.

@soifou
Copy link
Author

soifou commented Apr 27, 2020

Thanks for the typo, it's fixed and your feedback, glad you make it works.

@chlooriding
Copy link

Many thanks for this primer. I successfully managed to play ut99 on a buster running on a barebone. I got an error when reading from second cd and I had to manually extract maps using and "sudoing" the script posted here: https://www.linuxquestions.org/questions/linux-games-33/ut-171291/
Again, Thanks for sharing!

@K0ntrast
Copy link

K0ntrast commented Apr 6, 2021

Good install guide to get the base installation working on Linux. 👍

I'd thoroughly recommend using OldUnreal's v469b game update. It's as easy as overwriting installation files with the ones provided with the patch. It works on modern Linux 64-bit systems very well.

See here: https://github.com/OldUnreal/UnrealTournamentPatches/releases

I found I was still getting SDL errors on Debian 10 (stable) after following this guide. They seemed to be resolved by applying the new patch.

Enjoy!

@vKnmnn
Copy link

vKnmnn commented Feb 5, 2022

Using the latest patch that @K0ntrast mentions, i get a working game now, too. For sound, don’t forget installing libpulseudio in 32bit variant (or libpipewire, if that’s what u use) and don’t change the audio to generic.

After applying the patch, ut won’t read from the settings in the loki dir anymore.

Maybe @soifou could be so good and update his instructions to include the use of patch 469b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment