1.01.2009

Civic adventures

My favourite computer games are the ones where you guide a country, build towns, and research advances. So the Civilization and it clones. Up to now I played the different versions of Freeciv and I am really happy with that, except that its AI is quite week, plus I would like to see a bit more animation during playing. There is a single version of the official Sid Meyer's Civilization series which was released to Linux, and it was the chapter “Call to power”. It is and old Loki game, but still you can buy it from tuxgames, the supplier of commercial Linux games, although Loki itself has bankrupted a few years ago. I have decided that it is time to buy this piece of gold, and I have done so.
The box was delivered in a few days, and it contains a fancy handbook and big format charts explaining the game in addition to the installation CD. Since the game was developed almost a decade ago, it is a bit tricky to fire up. I the firs step I have installed it on my Eee PC.
Of course the Eee PC does not have an optical drive, so I had to create an iso file from the CD on my desktop:

dd if=/dev/sr1 of=civctp.iso

where /dev/sr1 is the device file of the cd-reader. After migrating the file to the Eee pc (quick LAN favoured!) I can easily mount the iso as a cd:

sudo -i
mkdir /mnt/cdrom
mount -o loop /path/to/civctp.iso /mnt/cdrom

After that the /mnt/cdrom directory is just like a normal CD-ROM, I can do the installation. The installer itself requires Tk/Tcl and the version from the deion repository refused to work, so I have installed the game manually. It means that I had to follow the instructions of the readme file on the CD, untar two archives, applying the last official patch from Loki (version 1.2a), and that is all. I have also installed the video files so I can enjoy the animations too. Alltogether the full installation requires some 700 Mb disk space. I have put it to the user's home directory, because there is enough space there. Xandros for Eee PC comes with glibc 2.1 (shame on Asus to supply so old buggy system), but luckily this is the version against the game was compiled so it runs without additional tweaks. The only thing which is bad is the sound, It is skipping which is annoying. I think it could be fixed using the old SDL mixer, but I do not care because I play with the sound off not to disturb the rest of the family.
Doing the installation on my desktop PC was a bit more tricky. This time the installer run normally, so I installed he game via the easy way into /usr/local/games as root. Again, I have installed the videos. This way I do not have to insert the CD every time I (or my son) play. After starting the game, we can see the opening film, but after that it crashes with error related to linking. I have found the solution on the old gentoo wiki which has vanished this year, so I summarize shortly to fellow players. The problem caused that the old Loki games are compiled with the old libraries and the new versions installed on the modern systems are not compatible with the games. The main guilty component is glibc which has broken compatibility with version 2.3 several years ago. The solution is to pre-load the old libraries for these games. The bright gurus of the Linux world have collected the compatibility libraries and they are available as a tar package: loki_compat_libs-1.3.tar.bz2. I have opened it and put them into the /usr/local/games/CivCTP/Loki_Compat/ directory. I have created a startup script called /usr/local/bin/civctp with this content:

LD_LIBRARY_PATH=/usr/local/games/CivCTP/Loki_Compat/ /usr/local/games/CivCTP/Loki_Compat/ld-linux.so.2 /usr/local/games/CivCTP/civctp.dynamic --nocdrom --nosound

I can point the start icons to that script and it will start the game properly, but again, without sounds. So that's all the tricks, and now we can enjoy this evergreen game, one of the bests of the series.

No comments: