Compiling Prince Of Persia (SDLPoP) - Debian Linux Edition
Fedora 32 is x86 and a Red Hat based distro having a Pi 500 which is Arm64 and running Raspberry Pi OS (Debian based), I thought it would be fun to try and get the game working on my setup.
Just a quick history lesson, SDLPoP is an open-source (GPL v3) port of Prince of Persia that runs natively on Windows and Linux. It was originally programmed in 6502 assembler for the Apple II.
All the below steps are performed in the Terminal -
Firstly, let’s make sure Raspberry Pi OS is up to date.
$ sudo apt update
$ sudo apt full-upgrade
Now let’s install some essentials, note some of these packages might already be installed, but are listed here just in case.
Install the Linux build tools.
$ sudo apt-get install build-essential
Install git, which we will use to “copy” / clone the source code to the Pi.
$ sudo apt-get install git-all
Now let’s install the SDL framework.
$ sudo apt-get install libsdl2-2.0-0
$ sudo apt-get install libsdl2-dev
$ sudo pt-get install libsdl2-image-dev
On my Pi, I have created a Projects directory where I copy my code, move to your “Project” directory.
$ cd Projects
“Copy” / Clone the Prince of Persia source from GitHub
$ git clone https://github.com/NagyD/SDLPoP
Move to the source code and compile.
$ cd SDLPoP/src
$ make all
Move back a directory and play the game.
$ cd..
$ ./prince
Field Notes - Here are some additional resources you might enjoy -
The Making of Prince of Persia by Jordan Mechner
GDC Vault - Classic Game Postmortem: Prince of Persia
Prince of Persia Code Review by Fabien Sanglard
The Story Behind the Making of Prince of Persia by Christian Nutt
Prince of Packaging: A tale of 1990s box art by Jordan Mechner