HowTo: Alpha Centauri on Linux

Posted by HokieTux on July 21, 2008 in Guides, Hacks

For the unacquainted, Alpha Centauri is one of the most acclaimed turn-based strategy games of all time.  Released in 1999, it revolutionized strategy gaming and is still considered one of the best games ever made (look at any top 100 games of all time list, and you will likely see AC appear).

Before they shut their doors, Loki Software ported Alpha Centauri and it’s expansion, Alien Crossfire, to the Linux platform.  Unfortunately, due to some library compatibility issues, the old release of Alpha Centauri will no longer work out-of-the-box on Linux.  I discovered this when, feeling somewhat nostalgic, I decided to install it and fire it up.  After a lot of searching and tinkering, I got it up and running almost perfectly.  I still experience a little buzzing in the sound… but otherwise it’s excellent.  Here is what I had to do to get it up and running:

Installing Alpha Centauri Planetary Pack

1)  Obviously, make sure you have a copy of Loki Software’s Alpha Centauri Planetary Pack (ACPP) for Linux.  These haven’t been in production for years, and are nearly impossible to find on the web.  Indeed, I’ve seen them sell for hundreds of dollars on eBay… so if you don’t already have one (and since I’m in no way recommending any sort of illegal activity), you are probably shit-out-of-luck.

2) Install ACPP by running their installer script.  When asked if you want to install the Loki Updater, say no (it doesn’t work).  You will also be asked if you want to install the Loki Uninstaller… I haven’t tested this, so I have no idea whether or not it works.  I’m not sure why it wouldn’t, but why bother?  AC is bloody awesome.  Also, make sure you install all content so you don’t need to have the CD in your machine to play (this came before all that shitty anti-piracy software).

3) Install the smac-6.0b-x86 patch.  You can find it here: http://filebox.vt.edu/users/bhilburn/Public/smac-6.0b-x86.run.  Just download it, set the executable flag with:

$ chmod +x smac-6.0b-x86.run

And then run it (as root):

# sh smac-6.0b-x86.run

4) Next, you will need to download and put the ‘Loki Compatible Libraries’ somewhere where AC can see them.  You can find them on the Gentoo wiki, or here is a direct link: loki_compat_libs-1.3.tar.bz2.  Unless you changed something, ACPP likely installed to /usr/local/games/smac.  I recommend putting the ‘Loki_Compat’ directory that comes out of that tarball in that directory so you don’t lose track of it.  So, for example, do:

$ tar jxvf loki_compat_libs-1.3.tar.bz2
# mv Loki_Compat /usr/local/games/smac

5) You likely need to change the ownership of your personal Loki directory since the installer likes to install it with root as the owner.  This should do the trick:

# chown -R <your username> ~/.loki

6) Now, you can’t run the game with a composite engine running (Compiz-Fusion, for example).  So make sure you turn it off if you have it running.  You might also need to disable the composite extension in your Xorg configuration file.  Edit /etc/X11/xorg.conf (as root, obviously), and add the following:

Section "Extensions"
    Option "Composite" "Disable"
EndSection

Or, if it already exists, make sure it says “Disable” rather than “Enable”.  You’ll then need to restart your Xserver, which you can do by pressing CTRL-ALT-BACKSPACE.

7) Now then, in order to run the game, you need to tell the executable where some libraries are.  Some people only need to point to the Loki_Compat libraries, but I kept getting the following error:

/usr/local/games/smac/smacx.dynamic: symbol lookup error:
/usr/local/games/smac/smacx.dynamic: undefined symbol:
XGetWindowAttributes

If you get this error, then you also need to link to the X11 libraries.  To run the game, execute this command:

For Alpha Centauri (original):

LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so
/usr/local/games/smac/smac.dynamic

For Alien Crossfire:

LD_PRELOAD=/usr/local/games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so
/usr/local/games/smac/smacx.dynamic

Obviously, if you put the Loki_Compat directory somewhere else, then you will need to change the linker location.  The same goes if you changed the default install location.  That’s it!  You should be up and running!

If you run into problems, post here and I’ll try to help you out!  Or, if this guide helped you out, post and let me know!

Further Tweaks

For further tweaking, check out ~/.loki/smac/Alpha_Centauri.ini.  If you read through the README or Google around, you can find a lot of cool hacks (changing the resolution, for example, or running the game in windowed mode).

References

17 Comments on HowTo: Alpha Centauri on Linux

By jeferson.info - o seu blog de linux on November 9, 2008 at 6:58 am

hi.
I search in internet but can’t find “smac-6.0b-x86.run”.
U can send to me?

Thanks
Jeferson

By HokieTux on November 12, 2008 at 12:35 am

The link that I provided in the post appears to still be valid:
http://files.filefront.com/smac+60b+x86run/;9769317;/fileinfo.html

Did you have trouble downloading it or getting it to run properly? If for whatever reason you can’t download from FileFront, let me know and I’ll throw the patch up for download as well.

By AC fan on May 16, 2009 at 11:41 pm

The filefront link no longer seems to work. If you can make the patch available somewhere else, that would be terrific. I have been trying to get AC working on Unbuntu 9.04 and it’s crashing with the undefined XGetWindowAttributes symbol error, which appears to be addressed by the 60b patch.

By HokieTux on May 19, 2009 at 11:32 am

AC fan –

Hm… you’re right… the link is down. Let me get the file off the box that I have AC installed on, and I’ll get it uploaded.

However, I don’t think your problem is related to the patch. The ‘XWindowGetAttributes’ issue is related to linking to the proper libraries at runtime. See the part of my post related to LD_PRELOAD, and let me know if that fixes your problem.

By Kolja on May 24, 2009 at 5:50 pm

I’d also love it if you could put the patch up somewhere. It’s disappeared from the internets.

I’d also love it if SM would allow someone to take the loki source and recompile for a modern system. I donno how much work would be involved, but I’d pay 20$ for a new version that would work without headaches.

By syncroswitch on May 26, 2009 at 7:44 am

I cant find the 6.0b patch either… It would be great if someone would post it.

By HokieTux on May 27, 2009 at 6:12 pm

Sorry I’m slacking guys – I’ll have it up in the next couple of days. I’m mid-move and getting settled into a new job. As soon as I find some free time, I’ll dig through my data drive and find it.

By Slammer64 on June 4, 2009 at 7:26 pm

You can find the patch @ https://babelize.org/download/lokigames/

By Obs on June 14, 2009 at 12:58 pm

I can find the 6.0a patch at https://babelize.org/download/lokigames/ but not the 6.0b one.

And I get an error with the 6.0a patch.

# sh smac-6.0a-x86.run
Verifying archive integrity…tail: cannot open `+6′ for reading: No such file or directory
Error in check sums 377969084 2291058509

By HokieTux on June 16, 2009 at 6:13 pm

Hey all -

Okay, I’ve thrown up the patch. You can find it here:
http://filebox.vt.edu/users/bhilburn/Public/smac-6.0b-x86.run

Hope it helps, and I’m sorry that it took me so long to get it out there!

Cheers

By Obs on June 16, 2009 at 10:58 pm

Yes, got it working, thanks!

By HokieTux on June 25, 2009 at 2:00 pm

No problem. I updated the post with the new patch location – hopefully it helps everyone else who was having trouble as well!

By Jared Spurbeck on June 28, 2009 at 4:16 pm

The patch seems to disintegrate into all these weird symbols after a few screens, even though it looks like a script towards the top. Is that normal?

By HokieTux on June 30, 2009 at 6:32 pm

@Jared – Hmmm… you are right. It looks to me like the script at the top might actually invoke a binary contained in the rest of the file (i.e. a non-open source patch).

Although, whether it is normal or not, it works!

By Sustuso on July 22, 2009 at 11:44 am

I can’t play, after the “landing on the planet the game crash with message

X Error: BadMatch
Request Major code 66 ()
Error Serial #1014
Current Serial #1017

Can you help me?

By HokieTux on July 27, 2009 at 10:05 am

Sustuso -

Can you give me more details about your setup? Xorg.conf, etc?

Take a look at these two threads and see if anything suggested helps:
http://ubuntuforums.org/archive/index.php/t-298679.html
http://ubuntuforums.org/archive/index.php/t-311521.html

By Leon on September 2, 2009 at 11:58 am

Installing this on Xubuntu 9.04, I couldn’t get it to work when I installed it to /usr/local. Finally I installed it to Games under my home folder, and that did it. Here are the instructions I wrote up for myself for future reference, in case someone else finds them helpful (remember, my user name is leon–you’ll want to substitute your own of course):

Install the game to somewhere in your home directory (don’t let it install to the default, /usr/local/games/smac). I installed it to /home/leon/Games/smac. Install the whole game, of course.

Exit when setup is complete.

Patch the program by running smac-6.0b-x86.run.

Open loki_compat_libs-1.1.tar.bz2 and unzip the Loki_Compat to the Alpha Centauri folder.

You’ll have to give the system extra information. (Replace /home/leon/Games/smac with the path to the Alpha Centauri folder). Use the following to open:

ALPHA CENTAURI
LD_PRELOAD=/home/leon/Games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so /home/leon/Games/smac/smac.dynamic

ALIEN CROSSFIRE
LD_PRELOAD=/home/leon/Games/smac/Loki_Compat/libstdc++-3-libc6.2-2-2.10.0.so:/usr/lib/libX11.so /home/leon/Games/smac/smacx.dynamic

TO CREATE ICONS

Create script files, e.g. runsmac and runsmacx, in the Alpha Centauri directory, containing (respectively) just the code above.

Make them executable (open a terminal window there and enter “chmod +x runsmac” and then “chmod +x runsmacx”).

Create Launchers that point to those scripts.

Write a Comment on HowTo: Alpha Centauri on Linux

You can add images to your comment by clicking here.

Subscribe

Follow comments by subscribing to the HowTo: Alpha Centauri on Linux Comments RSS feed.

More

Read more posts by HokieTux