Playing Loki's SMAC safely on recent systems
The computer strategy game Alpha Centauri (SMAC) keeps getting older and is not maintained since the company having the rights -- Loki software -- closed its doors, and the source code to the program is not by any means available to the public. It crashes easily for many reasons, but mostly for incompatibilities with the recent sound and graphic architectures. This is a game that I still enjoy from time to time when I feel very lazy. I get discouraged easily when the program crashes, leaving the screen resolution in a different setting, a few times in a row.
A large number of recent Linux installations have graphic features activated from an extension called Composite. This extension allows to create visual effects that are used in software such as Compiz and Beryl. However, SMAC is completely incompatible with the Composite extension, resulting in a crash shortly after the game starts (when the capsule lands, and the first base is founded). The usual workaround is to disable the Composite extension by adding a configuration option for the Xorg server, but doing this will prevent visual effects to work.
A different option is to use an embedded X server that will be only used for displaying the game. I use Xephyr, which can be launched by using the command
Note that we can disable the Composite extension for this X server only. To launch SMAC, I have to specify the display to use. In the current example, Xephyr will create an X server as display :1.

You should now see SMAC running in the Xephyr window.
A large number of recent Linux installations have graphic features activated from an extension called Composite. This extension allows to create visual effects that are used in software such as Compiz and Beryl. However, SMAC is completely incompatible with the Composite extension, resulting in a crash shortly after the game starts (when the capsule lands, and the first base is founded). The usual workaround is to disable the Composite extension by adding a configuration option for the Xorg server, but doing this will prevent visual effects to work.
A different option is to use an embedded X server that will be only used for displaying the game. I use Xephyr, which can be launched by using the command
Xephyr :1 -screen 800x600 -extension CompositeNote that we can disable the Composite extension for this X server only. To launch SMAC, I have to specify the display to use. In the current example, Xephyr will create an X server as display :1.
DISPLAY=:1 smacpack
You should now see SMAC running in the Xephyr window.
0 TrackBacks
Listed below are links to blogs that reference this entry: Playing Loki's SMAC safely on recent systems.
TrackBack URL for this entry: http://www.deuxpi.ca/cgi-bin/mt/mt-tb.cgi/43

Hi, I can't seem to get Xephyr working with lpia... is there any way to do such a thing with an lpia install of ubuntu?
Xephyr crashed on a LPIA virtual machine I just built. I filed a bug in Launchpad about this:
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/298868
Is this the same problem you are experiencing? As a workaround, you may use the older Xnest (apt-get install xnest) instead of Xephyr. It looks like Xnest doesn't support Composite so you probably don't have to disable it explicitly:
xnest :1 -geometry 800x600
Yeah, this doesn't work. I get the same BadMatch X error using Xephyr that I get when I just run it in my main X session, and when I try it with Xnest it just segfaults immediately.
It actually did work beautifully (running Linux Mint 7), but without any sound for some reason. Still, really useful advice, thank you.
@Alcher You may need to install the "oss-compat" package or something similar. This should create a /dev/dsp device that is compatible with old applications.