Installing the Game Linux
Appearance
There wasn't a retail Linux version of this game, instead the developers provided a downloadable tarball with Linux binaries to use with the Windows CD. In the readme that comes with it says:
To install the Kingpin files, you will need to install Kingpin under win32,
and then mount the installation folder under linux, and copy the installed
files across.
Kingpin requires approx 550mb of free hard drive space.
There is also a other you won't need to do that.
Install the game
To install the required utils:
sudo apt-get install unshield xxd
Next, let's say you want to install the game in $HOME/games/kingpin:
mount /dev/cdrom /media/cdrom
mkdir $HOME/games/kingpin
unshield -d $HOME/games/kingpin -L x /media/cdrom/kingpin/data1.cab
cd $HOME/games/kingpin
rsync -a common_files/ mature_files/ program_executable_files/ ./
rm -rf common_files/ low_violence_files/ mature_files/ program_executable_files/ us_specific_files/ *.exe *.dll main/gamex86.dll
cd -
Download kingpin-1.20_glibc-i386-linux2.0.tar.gz
tar xzf kingpin-1.20_glibc-i386-linux2.0.tar.gz -C $HOME/kingpin
cd $HOME/kingpin
rm lib3dfxgl.so libGL.so libMesaGL* libTNTgl.so
echo $HOME/games/kingpin > kingpin.conf
Download kphack and extract it in your installation directory.
kphack can be traced back to this unofficial installer, but I never found the source code.
Make sound working
See if snd-pcm-oss is working
lsmod | grep snd_pcm_oss
If doesn't show any info:
sudo modprobe snd-pcm-oss
Optional (Mixer):
sudo modprobe snd_mixer_oss
It should now show info with:
lsmod | grep snd_pcm_oss
Test sound with:
cat /dev/urandom > /dev/dsp1
CTRL+C to cancel test Now to fix sound with kingpin:
echo kingpin 0 0 direct | sudo tee /proc/asound/card0/pcm0p/oss
Start the game
#!/bin/sh
#
# Kingpin: Life of Crime startup script
#
# The user preferences directory
KINGPIN_PREFS="${HOME}/.kingpin"
# KPHack options
export KPHACK_DGAMOUSE=1 KPHACK_FULLSCREEN=1 KPHACK_WHEEL=0
# Function to find the real directory a program resides in.
# Feb. 17, 2000 - Sam Lantinga, Loki Entertainment Software
FindPath()
{
fullpath="`echo $1 | grep /`"
if [ "$fullpath" = "" ]; then
oIFS="$IFS"
IFS=:
for path in $PATH
do if [ -x "$path/$1" ]; then
if [ "$path" = "" ]; then
path="."
fi
fullpath="$path/$1"
break
fi
done
IFS="$oIFS"
fi
if [ "$fullpath" = "" ]; then
fullpath="$1"
fi
# Is the awk/ls magic portable?
if [ -L "$fullpath" ]; then
fullpath="`ls -l "$fullpath" | awk '{print $11}'`"
fi
dirname $fullpath
}
# Set the home if not already set.
if [ "${KINGPIN_DATA_PATH}" = "" ]; then
KINGPIN_DATA_PATH="`FindPath $0`"
fi
LD_LIBRARY_PATH=.:${KINGPIN_DATA_PATH}:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
export KINGPIN_DATA_PATH
export LD_PRELOAD="${KINGPIN_DATA_PATH}/kphack.so:$LD_PRELOAD"
create_prefpath()
{
path="${KINGPIN_PREFS}"
if [ ! -d "$path" ]; then
echo "Creating directory $path"
mkdir "$path"
fi
}
copy_if_needed()
{
dist="${KINGPIN_DATA_PATH}/kingpin.conf"
file="${KINGPIN_PREFS}/kingpin.conf"
if [ ! -f "$file" ]; then
echo "Installing default $file"
cp "$dist" "$file"
fi
}
# KPHack doesn't play nicely with $HOME/.kingpin when starting a new game
# when saves already exist in main/save/current/
fix_current_saves()
{
if [ -e ${KINGPIN_PREFS}/main/save/current/game.ssv ]
then
rm ${KINGPIN_PREFS}/main/save/current/*
fi
}
# Hey, it's fun time!
if [ ! -d ${KINGPIN_PREFS} ]
then
echo "Creating preferences directory..."
create_prefpath
copy_if_needed
fi
# Let's boogie!
if [ -x "${KINGPIN_DATA_PATH}/kingpin.x86" ]
then
fix_current_saves
cd "${KINGPIN_DATA_PATH}/"
exec "./kingpin.x86" +set vid_ref glx \
+set gl_driver libGL.so.1 "$@" +set _windowed_mouse 1 $*
fi
echo "Couldn't run Kingpin: Life of Crime (kingpin.x86). Is KINGPIN_DATA_PATH set?"
exit 1