Author Topic: SMAC on Linux / Loki version of SMAC  (Read 312 times)

0 Members and 1 Guest are viewing this topic.

Offline DrazharLn

SMAC on Linux / Loki version of SMAC
« on: August 22, 2019, 03:45:15 AM »
Because I am procrastinating, I got the original Loki port of SMAC to run on my (linux) laptop.

Because it took me a while to work it out and the necessary information was spread out over a wide area, I've put the instructions on github:

Copied below as well:

# Installing Loki's port of Sid Meier's Alpha Centauri and Alien Crossfire

## Why?

There's really no good reason to. Get the windows version from GOG and run it in `wine`. That way you can use unofficial patches, too.

The text is rendered a bit nicer in the linux version.

## How?

1. Get the loki games CD or an iso of it
2. Mount it and run ``
3. Try running the binaries `smac` and `smacx`. They're static and it's not impossible they'll *just work*. Can also try `qemu-i386 smac`. Didn't work for me (segfault without qemu; `Unable to initialize SDL: Not enough resources to create thread` with)
3. If it's not working yet or you want allegedly less bugs, get the 6.0a patch (also on releases page). This fixes some bugs and provides dynamically linked copies of smac and smacx that we can use.
4. Run the patch with ` --keep` because it won't find `loki-patch`. Then `cd smac-6.0a-x86; bin/Linux/x86/loki_patch patch.dat /path/to/smac/` to patch
5. Get the Loki compatibility libraries from (also on releases page) and extract them somewhere
6. Run with `LD_LIBRARY_PATH=/path/to/Loki_Compat /path/to/Loki_Compat/ /path/to/smac/smacx.dynamic`
7. If you don't want it to steal the whole display use Xephyr (see launch script below)

## Caveats

Music isn't supported. The whining you might get from ALSA isn't about that.

IP multiplayer crashes the game. Hotseat/PBEM is fine.

Check Loki's FAQ:

## Launch script

Adapted from a script on the lutris db. You'll probably want to change the paths.


if [ ! -e /dev/dsp ]; then
    sudo modprobe snd-pcm-oss
Xephyr :1 -screen 1024x768 -extension Composite -fullscreen -name "Alpha Centauri"&
sleep 1

DISPLAY=:1 LD_LIBRARY_PATH=~/SMAC/Loki_Compat ~/SMAC/Loki_Compat/ ~/SMAC/smac/smac.dynamic
kill -9 $xephyr_pid


* User

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
18 (6%)
XP Compatibility patch
9 (3%)
Gog version for Windows
77 (29%)
Scient (unofficial) patch
28 (10%)
Kyrub's latest patch
14 (5%)
Yitzi's latest patch
85 (32%)
AC for Mac
2 (0%)
AC for Linux
5 (1%)
Gog version for Mac
10 (3%)
No patch
12 (4%)
Total Members Voted: 260
AC2 Wiki Logo

* Random quote

Some vices miss what is right because they are deficient, others because they are excessive, in feelings or in actions, while virtue finds and chooses the mean.
~Aristotle 'Nichomachean Ethics', Datalinks

* Select your theme