Author Topic: SMAC on Linux / Loki version of SMAC  (Read 236 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: https://github.com/DrazharLn/smac-loki-linux

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 `setup.data/bin/Linux/x86/setup`
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 http://updates.lokigames.com/smac/ (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 `smac-6.0a-x86.run --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 http://www.improbability.net/loki/ (also on releases page) and extract them somewhere
6. Run with `LD_LIBRARY_PATH=/path/to/Loki_Compat /path/to/Loki_Compat/ld-linux.so.2 /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: http://faqs.lokigames.com/smacfaq.html

## Launch script

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

```sh
#!/bin/bash

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

DISPLAY=:1 LD_LIBRARY_PATH=~/SMAC/Loki_Compat ~/SMAC/Loki_Compat/ld-linux.so.2 ~/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 (7%)
XP Compatibility patch
-=-
9 (3%)
Gog version for Windows
-=-
70 (27%)
Scient (unofficial) patch
-=-
26 (10%)
Kyrub's latest patch
-=-
14 (5%)
Yitzi's latest patch
-=-
85 (33%)
AC for Mac
-=-
2 (0%)
AC for Linux
-=-
5 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
12 (4%)
Total Members Voted: 251
AC2 Wiki Logo

* Random quote

Imagine the entire contents of the planetary datalinks, the sum total of human knowledge, blasted into the Planetmind's fragile neural network with the full force of every reactor on the planet. That is our last-ditch attempt to win humanity a reprieve from extinction at the hands of an awakened alien god.
~Academician Prokhor Zakharov 'Planet Speaks'

* Select your theme

*