shivansps
Posts: 24
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
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 Sat Jan 12, 2019 10:49 pm, edited 15 times in total.

shivansps
Posts: 24
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.

Return to “Gaming”