Jump to content

OpenJK on Raspberry Pi


Recommended Posts

Just thought I would post this, I finally got OpenJK running on the Raspberry Pi 2 with the new experimental OpenGL driver, and I check youtube and aww dammit, somebody beat me to this by two weeks :rolleyes: . Well at least I can confirm that it runs on the Pi as well.

Im gonna give converting the system over to the PiTFT screen a try, but for the moment it at least works more or less on the HDMI output.

V6Cy19D.jpg
 

 

 

7HiMwG0.jpg


FHNWIyE.jpg

Overall performance wasnt too bad, although model and textures are best on low setting, or sometimes the game will crash when loading a large map like kor2. The entrance to Ragnos Tomb in kor2 seems to have some issues with the base flickering through when looking from across the valley, but that might just be an issue with the low model detail setting. 

Cerez, ChalklYne, Futuza and 1 other like this
Link to comment

It'd be cool if you put up a tutorial for how you did everything, I think people would find it interesting.

I followed most of the build instructions that @@capturesteve originally laid out here:

 

https://jkhub.org/topic/5549-running-dedicated-server-on-raspberry-pi/

 

 

sudo apt-get install libjpeg8-dev libpng12-dev zlib1g-dev freeglut3-dev cmake git make vim
## install the software packages that we need to build and run OpenJK
sudo apt-get install libsdl2-dev
## this might not be 100 % necessary, I think the latest raspbian with
## jessie now includes SDL2 by default
cd ~
mkdir dev
## go to home directory and make a development folder to store source in
## change this if you have a different preferred development folder
cd dev
git clone https://github.com/JACoders/OpenJK.git
cd OpenJK
## clone the source and go to the new directory
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/jka/
## shorter directory path to make it easier to navigate to the
## game in terminal
make -j4
## this will pretty much lock everything up for a while using all
## four cores on the Pi 2, but build takes long enough as it is
## compilation on the Pi B+ took absolutely forever
make install

Next we need to copy the bare minimum pk3 files over to the pi via usb stick. I dont particularly recommend ftp for this unless you have a ton of time on your hands.

 

 

cp /memory_stick/assets*.pk3 ~/jka/base
## can someone double check the path for ~/jka/base for me
## I think this should be the right path to the base directory
## where the pk3s need to be stored

## if not, just put them in the base folder 1 below wherever
## make spits out the openjk_sp.arm executable

Now we need to enable the full OpenGL support now available on the Pi 2 (and only on the Pi 2). Up until recently the Raspberry Pi had OpenGL ES support, a limited subset of OpenGL that isnt good enough to run OpenJK. The latest Raspbian Jessie has a super buggy OpenGL driver which we can use however.

 

 

sudo apt-get install xcompmgr libgl1-mesa-dri
## OpenGL support needs some additional software
cd /boot
sudo vim config.txt
## we need to modify the boot config to avoid an odd issue with the
## GL driver. Editing the config.txt, we need to add a line
## avoid_warnings=2 wherever you like. Save and close the file
sudo raspi-config

In raspi-config, select Advanced Options, and enable OpenGL support. Reboot when prompted to make the changes take effect.

 

Once the system comes back up, open your terminal, cd to the directory where the build is and run

 

cd ~/jka/
./openjk_sp.arm
## cross fingers and may the force be with you

Hopefully I didnt miss anything important. Please post any issues with this guide here and I will try to fix them.

Futuza, Cerez and SomaZ like this
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...