shivansps
Posts: 27
Joined: Thu Jan 26, 2012 5:11 pm

How to run Freespace 2 Open on Raspberry PI 3

Thu Jan 03, 2019 1:43 am

Image
This is the classic Freespace 2 game from 1999, getting it to work is petty much stright forward, i had to compile a launcher and a fs2open binary.
I had to use a rather old version of the source code since the up to date version needs OpenGL 3.1 minimum. So i tested it working with 3.6.18, 3.7.0 and 3.7.2 versions, anything newer than that needs OpenGL 3.1.
So lets start with this guide.

Part 1 : Compiling & installing Wxlauncher
Open a terminal and run these commands

Code: Select all

sudo apt-get install build-essential libopenal-dev libwxgtk3.0-dev git python-markdown cmake libsdl2-dev
git clone https://github.com/scp-fs2open/wxLauncher
cd wx*
cmake ./
sudo make install
wxLauncher should now be installed and avalible at "Accessories" after reboot. Also by default is installed to "/usr/local/bin", you can launch it from any terminal typing "wxlauncher".


Part 2 : Compiling Fs2 Open bin
Now that you have the launcher up and running you need to compile FS2_Open.
Open a terminal and run these commands

Code: Select all

sudo apt-get install libopenal-dev libjansson-dev libjpeg-dev liblua5.1-dev libogg-dev libpng-dev libsdl-dev libtheora-dev libvorbis-dev automake
wget http://scp.indiegames.us/builds/fs2_open_3_7_2_src.tgz
tar zxvf fs2_open_3_7_2_src.tgz
cd fs2_open_3_7_2
./autogen.sh
sed -i -e 's/-mtune=generic -mfpmath=sse -msse -msse2/-mtune=cortex-a53/' ./mongoose/Makefile
sed -i -e 's/-mtune=generic -mfpmath=sse -msse -msse2/-mtune=cortex-a53/' ./code/Makefile
sed -i -e 's/-mtune=generic -mfpmath=sse -msse -msse2/-mtune=cortex-a53/' Makefile
make -j4
Note: It should not be needed to do anything manually, but In case you get errors about -mtune=generic or -msee there are 3 files that need to be edited: fs2_open_3_7_2/Makefile, fs2_open_3_7_2/code/Makefile, and fs2_open_3_7_2/mongoose/Makefile
What you need to change is the same on every file, use a text editor and the search, seach for "-mtune" when you find -mtune, delete from that line "-mtune=generic -mfpmath=sse -msee -msse2". Those are x86 specific compiler flags that dont work on arm. These appear 2 times on each of the 3 files.


It will take a while (about 30 minutes) to compile on the RPI.

Part 3 : Making the fs2 root folder & configuring wxlauncher
1) Create a folder called "fs2_open" on the user folder (/home/pi/).
2) Copy the "fs2_open_3_7_2" executable file from the "fs2_open_3_7_2/code" folder on the source code you just compiled on this root folder.
3) You are ready to drop mods folder or the retail files in here. The retail files you are gona need are:

Code: Select all

root_fs2.vp
smarty_fs2.vp
sparky_fs2.vp
sparky_hi_fs2.vp
stu_fs2.vp
tango1_fs2.vp
tango2_fs2.vp
tango3_fs2.vp
warble_fs2.vp
If you dont have the freespace 2 retail file you can try the demo (instruccions on the 1st reply)

4) launch wxlauncher from accessories menu.
5) Basic Settings-> Browse for Game Root folder -> select the "fs2_open" folder you just created.
6) Select "fs2_open_3_7_2" as"fs2 open executable".
7) Video Resolution: 1280x720 MAX, Depth: 16 or 32 bits, Texture Filter: Bilineal, Anisotropic: off, anti-aliasing:off
8) Playback device: Select vc4_hdmi if you are running off HDMI audio, dont enable EFX.
9) Go back to Welcome and save the profile.


Here is a video guide and gameplay.
https://www.youtube.com/watch?v=TA6ew4aXpl4

Notes: As i was unable to get S3TC texture compression working on the RPI, getting mods to work is a problem, FS2 Retail game files and the fs2demo works. That for sure.
Last edited by shivansps on Fri Aug 02, 2019 12:23 am, edited 16 times in total.

shivansps
Posts: 27
Joined: Thu Jan 26, 2012 5:11 pm

Re: Freespace 2 Open on Raspberry PI 3

Thu Jan 03, 2019 2:49 am

Installing Freespace 2 Demo "mod" to fs2_open
1) Download https://drive.google.com/open?id=1jF0YL ... _7QTjMROOq
2) Uncompress
3) Copy folder inside the "fs2_open" root folder
4) Run wxlauncher
5) Go to "mods"
6) Select & Enable "Freespace 2 Demo" from the list
7) Play!

Image
Image
Image

kwadroke
Posts: 31
Joined: Tue Jan 29, 2013 4:20 am

Re: How to run Freespace 2 Open on Raspberry PI 3

Mon Jan 14, 2019 3:54 am

Very Nice!

You might want to change the

Code: Select all

make
command to

Code: Select all

make -j4
and the code will compile a whole lot faster.

shivansps
Posts: 27
Joined: Thu Jan 26, 2012 5:11 pm

Re: How to run Freespace 2 Open on Raspberry PI 3

Fri Aug 02, 2019 12:23 am

has anyone tried on the RPI4?

laurent
Posts: 300
Joined: Thu Jul 26, 2012 11:24 am

Re: How to run Freespace 2 Open on Raspberry PI 3

Thu Aug 08, 2019 12:22 pm

Tested first on Pi 3 (last July Raspbian Buster version) before testing on Pi 4.
Every steps ran fine until I had launched the game itself. The game starts successfully but randomly returns to the desktop within few seconds.
I tested full and fake KMS OpenGL driver with 256 Mb for video memory.
May be something broke on Buster for this tutorial.

I own the original CD's and managed to extract the corresponding game's files. I was so excited on the idea of playing this game again :cry:
I'll soon try a newer version of fs2 open on the Pi 4.

EDIT : Tested back on the last Stretch image (2019-04-08) with a 3B+ and it works very well. I can confirm something is broken with Buster. I hope to test on Pi 4 next week (with a newer version of fs2 open, though).

shivansps
Posts: 27
Joined: Thu Jan 26, 2012 5:11 pm

Re: How to run Freespace 2 Open on Raspberry PI 3

Thu Aug 29, 2019 1:42 am

The problem of running newer versions of fs2open is the minimum OPENGL version they need... thats something that may be fixed with newer Stretch versions or in the RPI4.

This was also the reason of why i was unable to run mods, because i needed S3TC support, and i never made it to work.

laurent
Posts: 300
Joined: Thu Jul 26, 2012 11:24 am

Re: How to run Freespace 2 Open on Raspberry PI 3

Fri Aug 30, 2019 9:20 pm

shivansps wrote:
Thu Aug 29, 2019 1:42 am
The problem of running newer versions of fs2open is the minimum OPENGL version they need... thats something that may be fixed with newer Stretch versions or in the RPI4.

This was also the reason of why i was unable to run mods, because i needed S3TC support, and i never made it to work.
Fortunately, I own a Pi4B2 to play with. But for now, I'm in vacations.

Anyway, your great tutorial may be updated for Buster compatibility.

superjugy
Posts: 2
Joined: Sun Sep 15, 2019 3:16 am

Re: How to run Freespace 2 Open on Raspberry PI 3

Mon Sep 16, 2019 1:56 pm

Hi. Did you guys ever figured out the S3TC issues? it is my understanding that Mesa 19 which comes with Buster in RPI4 should be able to handle S3TC. Is the issue because of VideCore VI and not related to Mesa? I'm having a similar issue when trying to run a project done with jmonkeyengine 3 using that texture compression.

Return to “Gaming”