Tag Archives: Raspbian

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

How to create your Raspberry Raspbian “Wheezy” SD card

When you want to operate your Raspberry Pi, you need an SD card with an “OS”. I like using Raspbian Wheezy, a Linux Debian distro tailored for the Raspberry Pi.

What do you need:

1) atleast a 2GB SD card (I prefer using class 10 SD Card with 4GB or more)

2) an SD Card reader

3) The Raspian Wheezy OS

4) Win32DiskImager

Download & unpack the Raspbian Wheezy OS.

Pu the SD card in the card reader and connect it to your PC.

Card Reader

Download & install Win32DiskImager (you only have to create a directory which includes all the files from Win32DiskImager)

Run win32diskimager.exe

Select the previously download Image File

Select the Card Reader with the SD Card as Device

Hit the Write button, wait for the write process to finish.

Win32DiskImager

PS: In case you want to make a back-up of your SD-Card you can create an Image File, select the Device (Card Reader) and press Read. This will create an image file of the SD card in the card reader.

PS2: in case you want to format your SD Card the HPUSDDisk.exe tool might come in handy, as it formats the SD Card regardless of size, OS and / or file system.