Thursday, December 22, 2011

Desura is now available for Linux

On a recent visit to the Desura website I noticed that they have a Linux client available (released last month). This is great news for both Linux gamers and developers alike. It allows for any game developer with a Linux compatible game to sell their product to Linux users across multiple distros with limited fuss.

I highly recommend any Linux user with an interest in games to download the installer to their home directory and start browsing through the available games.

Saturday, November 26, 2011

Doom 3 source is now available!

As I mentioned in my post in January, I have a lot of respect for id software and especially John Carmack, who has kept to his promise of release the source for Doom 3. It's been made available on GitHub by Timothee Besset:

https://github.com/TTimo/doom3.gpl

There has already been a good few fixes put in place by various other GitHub users. It'll be interesting to see what kind of open source games will be released off the back of this engine.

Friday, July 22, 2011

How To: Substitute words using vim

It's always nice when you learn something useful. I've been using vim for a while but I only use a fraction of its functionality. Today I picked up a nice little feature for substituting words. While in Normal Mode use:
:%s/word/substitution/gc
The g and c on the end are not required but they suit my needs. The g is to search globally and the c is used so that it will ask you to confirm the substitution each time it comes across a matching work. Always better to play it safe.

Wednesday, July 06, 2011

How To: Install Unreal 2004 on Ubuntu Linux

It's unfortunate that Epic will never release a native Linux installer for UT3 but UT2004 is still, after all these years, a great game to play after a long day at work.

This guide aims to provide all the steps needed to get up and running in Ubuntu 11.04 (64-bit), as well as a few additional tweaks. Much of the information here was found on the Ubuntu Forums, I just wanted to keep it all together. The installation was done using the DVD version of the game (released by Atari).

Things to consider before you continue

Unreal 2004 is pretty old now so it's not just a case of running the installer. There is nothing hard about the installation though. The two main issues are that the game requires an old version of the GNU Standard C++ Library and the sound uses OSS (Open Sound System) which has been disabled in Ubuntu for some time. Another problem that effects 64 bit users is that after applying the 3369.2 patch the game does not start. This is easily remedied by editing the startup script.

Download libstdc++.so.5

Ubuntu 11.04 uses libstdc++.so.6 but libstdc++.so.5 is still available through the repositories:
sudo apt-get install libstdc++5

Run the installer

When running the installer, I recommend using the default settings as it'll make things easier. When the installation is complete it'll ask if you want to run the game select no otherwise you'll be running it as the root user.
sudo sh /media/UT2004_DVD/linux-installer.sh

Update to the latest patch - 3369.2

December 2005 saw the last patch for the game being released: ut2004-lnxpatch3369-2.tar.bz2
To install it the contents need to be extracted then copied to the installation directory (which be default is "/usr/local/games/ut2004/").
tar -jxvf ut2004-lnxpatch3369-2.tar.bz2
cd UT2004-Patch/
sudo cp -R * /usr/local/games/ut2004/


Fix the startup script

After patching the game I found that running ut2004 from the terminal would no longer start the game. This can be fixed by editing the startup script using a text editor such as gedit or vim to replace 'ut2004-bin' (the 32-bit binary) with 'ut2004-bin-linux-amd64' (64-bit binary):
sudo vim /usr/local/games/ut2004/ut2004

Solve the audio problem

At this point running ut2004 in the terminal should start Unreal. However, you may see an error "open /dev/[sound/]dsp: No such file or directory" and find there is no sound. You can get around this by launching the game with the PulseAudio OSS Wrapper (padsp):
padsp /usr/local/bin/ut2004

Create a launcher

To make the integration with the Ubuntu desktop a little nicer I chose to create my own launcher. To start with I got a 256x256 pixel png icon for the game and moved it to "/usr/share/icons/hicolor/256x256/apps/" and set the permissions for it:
sudo mv ut2004-256px.png /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
sudo chown root:root /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
sudo chmod 644 /usr/share/icons/hicolor/256x256/apps/ut2004-icon.png

I then created a .desktop file in "~/.local/share/applications/". This can be done in any text editor using something like:
gedit ~/.local/share/applications/ut2004.desktop
Then it's just a case using the following within the file:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_GB]=/usr/share/icons/hicolor/256x256/apps/ut2004-icon.png
Name[en_GB]=Unreal 2004
Exec=padsp /usr/local/bin/ut2004
Name=Unreal 2004
Icon=/usr/share/icons/hicolor/256x256/apps/ut2004-icon.png

You will need to log out and back in again, then the launcher will be available along with the rest of your applications.

Improve the graphics and enable dynamic shadows

Ok that's it you're done. You should start the game up and configure the settings for optimum performance. Most people by now will have a pc that can easily play this at full settings. Once you've had a play around with the game and already maxed all the settings in the game menu, do the following for that little extra.

In your home directory will be a hidden .ut2004 folder that contains your save games and settings. Some parameters will need to be set in UT2004.ini and User.ini. Find the relevant sections as described below. For the sections that require an amount in MB, make sure to use a value based on your hardware.

~/.ut2004/System/UT2004.ini

[Engine.Engine]
DetectedVideoMemory=384 (Number in MB, usually set to 0 by default)

[Engine.GameEngine]
CacheSizeMegs=128 (Number in MB, usually set to 64. Set higher for better performance)

[OpenGLDrv.OpenGLRenderDevice]
UseRenderTargets=True (required for dynamic shadows)
UseVSync=True (Set False by default. 'True' provides a more consistent framerate.)
UseVBO=True (Gives access to the OpenGL VBO. Set True for performance gain.)
UseVSync=True (This appears twice in the settings, for some reason. Set this to True as well.)
UsePixelShaders=True (Set to False by default. Gives access to pixel shaders.)

~/.ut2004/System/User.ini

[UnrealGame.UnrealPawn]
bPlayerShadows=True
bBlobShadow=False

[Engine.Vehicle]
bVehicleShadows=True

Wednesday, May 04, 2011

I'm now on to my 4th Steinberger guitar

Ned Steinberger's headless guitars have always appealed to me. The first one I owned was a bass which I'd purchased in my teens. I've since had a "Steinberger Spirit GT Pro Deluxe" and a "Steinberger Spirit GU-7R" which I recently sold. The Spirit range are the budget versions made of wood with EMG Select pickups. My most recent Steinberger, which arrived today, is the real deal. A Steinberger Synapse SS2F in white. This thing is a combination of graphite and hard maple with two EMG USA pickups (EMG-81 & EMG-85). It sounds amazing and is with out a doubt the best guitar I've owned.

Friday, January 28, 2011

ATI Radeon HD6000 series drivers for Linux

I recently decided to splash out and buy myself an ATI 6950 graphics card as it supports OpenGL 4.1 and I want to write programs that use the latest features. Anyway, after a few weeks of not even using he card due to the lack of Linux drivers for the 6900 series, this week ATI finally released Catalyst 11.1 with support for the new cards.

I was a little too eager to get it installed which resulted in a blank screen after reboot. However, the usual combo of Ctrl + Alt + F3 then running the un-installer got everything back to normal.
/usr/share/ati/fglrx-uninstall.sh
The problem was that as this was a fairly new system, I had not yet installed gcc or the kernel-devel packages. So for anyone out there that is having problems setting up their ATI graphics card under Linux, specifically Fedora, these steps may be of some help.

Before you install Catalyst there are a few bits you'll need. You'll need to be ROOT and it would be a good idea to update your system but not essential. You do however need gcc and the kernel-devel packages mentioned above. The kernel-devel package will add the relevant files for your current kernel version in:
/usr/src/kernels/
So for example, typing uname -r I could see my kernel version was 2.6.35.10-74.fc14.x86_64, so once I installed the kernel-devel package:
yum install kernel-devel
I had the following folder:
/usr/src/kernels/2.6.35.10-74.fc14.x86_64/
The Catalyst installer will also need the gcc compiler so make sure that is also installed:
yum install gcc
Download the ati-driver-installer-11-1-x86.x86_64.run file from the ATI/AMD website. Then navigate to the file using the terminal. You will need to make the file executable before you can run it so use:
chmod 755 ati-driver-installer-11-1-x86.x86_64.run
Then run the file:
./ati-driver-installer-11-1-x86.x86_64.run
That's it, you should be good to go. You will need to reboot your system for the changes to take effect. Before you do however it is a good idea to take a quick look at the log file for errors:
/usr/share/ati/fglrx-install.log

Sunday, January 23, 2011

How To: Install Doom 3 on Fedora 14 (64-bit)

I have a lot of respect for id software as they are one of the few game developers that have released large budget games with native installers for Linux. Doom 3 was released in 2004 and although the discs only contain a Windows installer, id provided a native Linux installer on their website. The latest version is 1.3.1 build 1304, released 2007 and available here:
ftp://ftp.idsoftware.com/idstuff/doom3/linux/doom3-linux-1.3.1304.x86.run
Unfortunately a 64 bit build was never made but Doom 3 will still run on a 64-bit system providing you have the 32-bit libraries that are required.

This guide will run you through the steps that are needed to install the game on a current Linux distro. I'm using Fedora 14 but the steps should be similar for other systems. You will need root access in order to follow these steps.

Step 1 - Download the required dependencies:

You'll need the following libraries on your system:
  • libX11.so.6
  • libXext.so.6
  • libGL.so.1
  • ld-linux.so.2
In order to find out what package you need to install to get the required file, use yum along with the whatprovides option:
# yum whatprovides libX11.so.6
It will state what package provides the lib file:
libX11-1.3.4-3.fc14.i686 : Core X11 protocol client library
So the next step is to install libX11:
# yum install libX11-1.3.4-3.fc14.i686
Follow this process for the other libraries that are needed:
# yum whatprovides libXext.so.6
Output: libXext-1.1.2-2.fc14.i686 : X.Org X11 libXext runtime library
# yum install libXext-1.1.2-2.fc14.i686
Now for LibGL:
# yum whatprovides libGL.so.1
Output: mesa-libGL-7.9-1.fc14.i686 : Mesa libGL runtime libraries and DRI drivers

So now you install mesa-libGL:
# yum install mesa-libGL-7.9-5.fc14.i686
Then just follow the same procedure for ld-linux
# yum whatprovides ld-linux.so.2
Outputs: glibc-2.12.90-21.i686, so now to install glibc
# yum install glibc-2.12.90-21.i686
Step 2 - Download and run the install file:

Download the install file from id's ftp site using the link provided earlier. The permissions will need to be changed so that the file is executable:
# chmod 644 /path/to/installer/doom3-linux-1.3.1302.x86.run
Now you can run the install file using:
# sh /path/to/installer/doom3-linux-1.3.1302.x86.run
At this point the installer will run through a couple of questions such as where you want to install to. By default Doom 3 installs to: /usr/local/games/doom3

Step 3 - Copy pk4 files from the installation discs:

Now to copy the required 'pk4' files from the install discs. This is the slowest part as it will take a few minutes for each file to be copied over to your hard drive. If you went with the default options during the installation, the files being copied will need to be placed in: /usr/local/games/doom3/base

The files that need to be copied are as follows:

Disc 1:
  • /media/DOOM3_1/Setup/Data/base/pak002.pk4
Disc 2:
  • /media/DOOM3_2/Setup/Data/base/pak000.pk4
  • /media/DOOM3_2/Setup/Data/base/pak001.pk4
Disc 3:
  • /media/DOOM3_3/Setup/Data/base/pak003.pk4
  • /media/DOOM3_3/Setup/Data/base/pak004.pk4

To copy the files use the following commands, changing discs as needed:
# cp /media/DOOM3_1/Setup/Data/base/pak002.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak000.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_2/Setup/Data/base/pak001.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak003.pk4 /usr/local/games/doom3/base/
# cp /media/DOOM3_3/Setup/Data/base/pak004.pk4 /usr/local/games/doom3/base/
If you are also installing the Resurrection of Evil Expansion Pack, you will also need to copy 'd3xp/pak000.pk4' to your d3xp/ directory: /usr/local/games/doom3/d3xp

Once you have copied the files from the discs, listing the contents of the directory will show that the permissions need changing:
ls -l /usr/local/games/doom3/base/
To set them correctly use chmod:
# chmod 644 /usr/local/games/doom3/base/*
Finishing up - Fix audio and resolution problems:

At this point you will have a shortcut in the Aplications menu to run the game but there are some final steps you may need to take. The first problem is that the sound engine in Doom 3 is based on OSS which has been disabled since Fedora 11.

To re-enable OSS you will need to edit /etc/modprobe.d/dist-oss.conf and uncomment the line within the file. Once this is done, reboot so that the changes take effect.

The second issue is the resolution. You may find that you cannot set Doom 3 to use the full native resolution of your monitor. If this is the case then simply edit your DoomConfig.cfg file (Resurrection Of Evil has its own DoomConfig.cfg).
vim .doom3/base/DoomConfig.cfg
The lines you will need to edit are:
seta r_mode "-1"
seta r_customHeight "####"
seta r_customWidth "####"
If r_mode is not set to "-1" the game will ignore your custom settings. (Thanks to hwhq.com for the resolution fix).

That's it! Doom 3 is now ready to go.

If you do have any problems then my advice would be to run Doom 3 with the log file enabled:
/usr/local/games/doom3/doom3 +set developer 1 +set logfile 1
Then to look at the log file use:
tail ~/.doom3/base/qconsole.log
Refer to the Doom 3 GNU/Linux FAQ if you need further information.

Monday, January 17, 2011

OpenOffice - JDK not detected on Mac OSX Snow Leopard

In October 2010 Apples Mac OSX software update (Java 6 u22) broke compatibility with OpenOffice.org 3.2.1 (and earlier versions).  To fix the problem you will need to replace two lib files: libjvmfwk.dylib.3 and sunjavaplugin.dylib

These files are located in:
/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/

Download the new versions:
ftp://qa-upload.services.openoffice.org/jl162/libjvmfwk.dylib.3
ftp://qa-upload.services.openoffice.org/jl162/sunjavaplugin.dylib

Backup original libs:
mv /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3 /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3_BAK
mv /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib_BAK

Copy the new libs files in place:
cp ~/Downloads/libjvmfwk.dylib.3 /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libjvmfwk.dylib.3
cp ~/Downloads/sunjavaplugin.dylib /Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/sunjavaplugin.dylib