Tag Archives: Quake

How to play Quake 3 on your Raspberry Pi

Today, I figured, it would be nice to do some old school fragging ūüôā It is time to get my Raspberry Pi to run Quake 3. There are quite a few tutorials, but it took me a couple of tries to find a combination that worked for me.¬†

For you, the quick way to get Quake 3 running on your Raspberry Pi is to download the Quake 3 SD card image for a 4GB SD Card from my public dropbox. You will find it under Images\Quake3\Quake3_4GB_autostart.zip In my previous posts I have explained how to mount an image on the SD Card by using Win32DiskImager. The image auto-starts Quake 3 on boot. In case you don’t want that, just use the following command after logging in:

sudo update-rc.d -f  quake3 remove 

Which removes Quake 3 from the start-up sequence. You can start the game by navigating to the directory where the game is located and start the game from there:

cd /home/pi/quake3/build/release-linux-arm
sudo ./ioquake3.arm

In case you insist in making your own image, this is how I got it to work:

Before you start, you need a 4GB SD Card with Raspbian Wheezy installed. Run sudo update and sudo upgrade. Start sudo raspi-config and expand the root partition to fill the SD card. Memory split should be configured with 64MB video memory. Reboot.

Step 1:

Log in to your Pi and then type at the command prompt:

sudo apt-get install git gcc build-essential libsdl1.2-dev

These tools are needed to install the Quake 3 source code!
Step 2:

Obtain the source code with this command:

git clone https://github.com/raspberrypi/quake3.git

Change to the Quake3 directory:

cd quake3
Step 3:

Edit the script that does the compilation:

nano build.sh
The first line (8) you are looking for starts with ARM_LIBS, change it so it says this:

ARM_LIBS=/opt/vc/lib
You also need to change the line (16) that starts with INCLUDES, change it to this:

INCLUDES=”-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads”
The final line (19) to change starts CROSS_COMPILE:

# CROSS_COMPILE=bcm2708-
Save the file by pressing Ctrl-X followed by Y and finally return.
Step 4:

Now you can begin the compilation process by typing:

./build.sh

the process takes approximately 60 minutes!
Step 5:

Once that has finished you need to download the pak files. This lets the game function!

Type:

cd
cd quake3/build/release-linux-arm
wget https://dl.dropboxusercontent.com/u/36774536/Images/Quake3/Q3DemoPaks.zip
unzip Q3DemoPaks.zip

The directory tree should look like this (using the default Pi user):

home
– pi
– – quake3
– – – build
– – – – release-linux-arm
– – – – – baseq3

and in the directory ‘baseq3’ there should be your PAK files.
Step 6:

Running the game: In order for you to run the game you have to be in the right directory, to get there type these commands:

cd
cd quake3/build/release-linux-arm
Start your game with this command:

sudo ./ioquake3.arm

In case you want Quake 3 to boot at start up follow the additional steps below:

Step 1:

sudo nano /etc/init.d/quake3

make the content of the file look like this:

#! /bin/sh
# /etc/init.d/quake3

### BEGIN INIT INFO
# Provides:          quake3
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Simple script to start quake3 at boot
# Description:       A simple script from https://raspberrypi4dummies.wordpress.com
### END INIT INFO

# If you want a command to always run, put it here
cd /home/pi/quake3/build/release-linux-arm
sudo ./ioquake3.arm

# Carry out specific functions when asked to by the system

exit 0

Save the file by pressing Ctrl-X followed by Y and finally return.

The last two commands complete the job of starting Quake 3 on boot:

sudo chmod 755 /etc/init.d/quake3
sudo update-rc.d quake3 defaults

HAPPY FRAGGING!

foto 4

Advertisements