How to install/ build/ play Quake 3....


132 posts   Page 1 of 6   1, 2, 3, 4, 5, 6
by raspberrypiguy1 » Sun Sep 30, 2012 2:23 pm
This post if for my new YouTube channel...

https://www.youtube.com/user/TheRaspberryPiGuy

So you have seen my video on how to do this (NEW VIDEO: http://www.youtube.com/watch?v=nSqFdguPEzI) But what are the actual pieces of code and downloads? Well here you go:

1:

Log in to your Pi (On Raspbian!) and then type into the Terminal:
Code: Select all
sudo apt-get install git gcc build-essential libsdl1.2-dev

This lets you install the Quake 3 source code!

2:

Obtain the source code with this little command:
Code: Select all
git clone https://github.com/raspberrypi/quake3.git


And then change to that directory:
Code: Select all
cd quake3


3:

Now the complex bit! We now have to edit the script that does the compilation. To access this script from the terminal use this command:

Code: Select all
nano build.sh


The first line (8) you are looking for starts ARM_LIBS, if you cannot see it, press Ctrl-W and type ARM_LIBS followed by the return key. Change it so it says this:

Code: Select all
ARM_LIBS=/opt/vc/lib


You also need to change the line (16) that starts INCLUDES, change it to this:

Code: Select all
INCLUDES="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads"


The final line (19) to change starts CROSS_COMPILE:

Code: Select all
#CROSS_COMPILE=bcm2708-


4:

Save the file by pressing Ctrl-X followed by Y and finally return. Now you can begin the compilation process by typing ./build.sh; the process takes approximately 30 minutes

5:

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

Now type:

Code: Select all
wget http://dl.dropbox.com/u/1816557/Q3%20Demo%20Paks.zip


MAKE SURE THEY ARE SAVED TO THE 'baseq3' FOLDER. OTHERWISE THE GAME WONT WORK.

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

home
pi
quake3
build
release-linux-arm
baseq3

AND THEN IN THE 'baseq3' there should be your PAK files. :) Happy?

5:

Running the game... In order for you to run the game you have to be in the right directory.... To get there type this command:

Code: Select all
cd /quake3/build/release-linux-arm/


NOW to start your game.... Horay! Use this little line of code:

Code: Select all
sudo ./ioquake3.arm


AND your done! Happy Fragging!

Please let me know if anything is amiss in this tutorial (download links don't work etc.) Please watch my other videos and don't forget to tell your friends and subscribe!

Thanks
The Raspberry Pi Guy

P.S: If any of you are successful, PLEASE tell me! ;)
Last edited by raspberrypiguy1 on Sun Aug 25, 2013 10:41 am, edited 1 time in total.
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by raspberrypiguy1 » Sun Sep 30, 2012 2:44 pm
Forgot to add:

All credit goes to 2 people! Thanks so much 'Pi Cymru' and also 'MitchTech'

The Raspberry Pi Guy
;)
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by billb » Sun Sep 30, 2012 3:02 pm
Thanks -- I've been wanting to try this! :D

I like the nano text editor, but when using it to edit config files, source code, etc., its a good idea to use the -w switch (or --nowrap to disable wrapping of long lines). Otherwise it may automatically insert line breaks for you -- not a problem for regular text documents but config files may be more sensitive to that. It is not likely to occur if you're running at a high resolution like 1920x1080 (1080p), but those using the composite video out on a TV might run into trouble.

So for example you'd use:

Code: Select all
nano -w build.sh
User avatar
Posts: 173
Joined: Wed Sep 19, 2012 10:27 pm
by raspberrypiguy1 » Sun Sep 30, 2012 4:32 pm
I have re-made my Quake 3 video using PuTTY... The resoultion of that video was unbearable! I will post the link as soon as it has finished uploading!

Thanks
The Raspberry Pi Guy
;)
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by raspberrypiguy1 » Tue Oct 02, 2012 5:20 pm
Here is my new video done over SSH... Sorry for the wait!

http://www.youtube.com/watch?v=nSqFdguPEzI&feature=plcp

I hope you enjoy and happy Piing!

The Raspberry Pi Guy
;)
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by Trixster » Wed Oct 03, 2012 9:01 pm
I got it working using your instructions, so thanks a lot!

A few points to note:

1) the compliling took closer to an hour than half an hour on a stock clocked Pi.

2) you should mention the bit about cd'ing into the baseq3 directory before giving the download link to the pak files.

3) you also need to mention that you need to unzip the downloaded pak.zip and that doing so might not unzip the paks into the directory you want it to! (It made another baseq3 dir in the existing baseq3 dir, so I had to move the unzipped paks down a level).

Other than that, all good.
Posts: 120
Joined: Sat Jul 07, 2012 3:53 pm
by fury » Fri Oct 05, 2012 4:02 pm
I am having a problem compiling. I made the changes and ran ./build.sh and it goes for a few minutes, having no problem compiling the first few files.

It runs into several errors starting with unknown type name 'vm_t' and NULL not defined in code/qcommon/vm.c

And because that file doesn't compile, make can't finish.

Sorry, I'd copy and paste but it seems to log me out of the forums. O_o

Any ideas?

Thanks!

edit: I just answered my own question by looking at the files directly. vm_local.h and every file after that in the entire repository is blank. I wonder why that happened. Is the git clone not making sure it gets the whole thing?
Posts: 9
Joined: Thu Sep 20, 2012 4:37 pm
by raspberrypiguy1 » Fri Oct 05, 2012 6:38 pm
I am sorry that has happened... Truth be told I do not know what the problem is! Are you running Raspbian? Have you successfully downloaded GitClone? Did you get any other errors before that step? Please expand on the situation!

Sorry I could not be of more help!

The Raspberry Pi Guy ;)
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by malakai » Fri Oct 05, 2012 6:48 pm
I got errors on this line

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

I have already installed git all by itself

That line just wouldn't resolve

I also got build errors but ignored them and it ran fine mostly variable issues like not used they are fine to ignore.

I did have to go to desktop and move the pak folder manually though.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by raspberrypiguy1 » Fri Oct 05, 2012 6:50 pm
I am really sorry about the Pak folder... I kinda forgot about it and where it was meant to be installed!!! I really sincerely hope that it did not cause you too much problems.

Thanks for all your feedback
The Raspberry Pi Guy
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by malakai » Fri Oct 05, 2012 6:55 pm
Oh no your fine I love your work and really appreciate everything you do best to try even if there are mistakes helps us learn even better (Linux is my second language and I don't speak it very well :D )

Just wanted to update you on it also if you can put

Code: Select all
typing ./build.sh


into a code statement I missed it when I went though initially and thought I was totally messed up it just blended in too much with the rest of the statement.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by raspberrypiguy1 » Fri Oct 05, 2012 7:00 pm
Oh Ok... How do you edit earlier posts? Bit of a newbie to this kind of forum!

Thanks
The Raspberry Pi Guy
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by malakai » Fri Oct 05, 2012 7:20 pm
Unfortunately I don't think you can it locks after so much time has passed on a not I just reimaged a card and this line

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

worked must have been a glitch before it did say git was already installed on wheezy armhf but the rest is downloading now.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by raspberrypiguy1 » Fri Oct 05, 2012 9:22 pm
Good good... Thanks for sharing!

The Raspberry Pi Guy
;)
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by malakai » Fri Oct 05, 2012 10:32 pm
well there went an hour I made a mistake and got a build error.

My mistake was in editing the file:

Code: Select all
ARM_LIBS=/opt/vc/lib


I had put ARM_LIBS=/opt/opt/vc/lib

so if your like me and get an error building it go back and check your edits on for try 2 this time I am trying on Berryboot wheezy should be the same but I did the first one successfully on the official untouched image. :mrgreen:
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by fury » Fri Oct 05, 2012 11:10 pm
raspberrypiguy1 wrote:I am sorry that has happened... Truth be told I do not know what the problem is! Are you running Raspbian? Have you successfully downloaded GitClone? Did you get any other errors before that step? Please expand on the situation!

Sorry I could not be of more help!

The Raspberry Pi Guy ;)

I don't know where it went wrong, and why it didn't say so when I did the git clone, but all of the files starting from vm_local.h and on were blank in qcommon, and in every directory after that (renderer, etc.)

I downloaded the ZIP manually from http://github.com/raspberrypi/quake3/ with a computer, unzipped it onto a flash drive, plugged the flash drive into the Pi, went into X and copied the files over my existing ~/src/quake3.

I had a problem with the libSDL symbolic link showing up as a regular text file instead of a symbolic link, probably due to the way I unzipped it on a Windows PC then copied over. That file being just a text file caused this linker error:
Code: Select all
/usr/bin/ld:lib/libSDL.so: file format not recognized; treating as linker script
/usr/bin/ld:lib/libSDL.so:1: syntax error


So I had to do this (from my src/quake3 directory):
Code: Select all
cd lib
rm libSDL.so
ln -s libSDL-1.2.so.0.11.3 libSDL.so
cd ..
./build.sh


But that still had problems, so I did a ./build.sh clean and then it worked. I guess it had a leftover from the failed compile that made things a little wonky.

Quake 3 is running, but not very fast, and it seems to be stuck at 1280x720, when my 7" screen is 800x480. Trying to track that down now. I've tried setting r_customWidth 800 and r_customHeight 480 and r_mode -1 and then vid_restart but it comes back still 1280x720.

It also cuts off the outer edge of the screen so I can't see the FPS meter or the first few characters in the console.

I haven't had this much fun trying to set up Quake 3 in at least 13 years! Image I remember the first computer I "owned", got for my 14th birthday and it was a K6-2 350mhz with 128mb of RAM and an 8 gb Quantum Bigfoot hard drive. Oh, did I mention it weighed about 20 lbs? and had an ATI Rage LT 4mb built in...15 fps if I was lucky, could manage 25-30 if I didn't mind looking at a bunch of flat grey polygons.

I'm just thrilled how much power is in this little SoC the size of my fingerprint on a computer that cost me less than Quake 3 did to begin with.
Posts: 9
Joined: Thu Sep 20, 2012 4:37 pm
by pete910 » Sat Oct 06, 2012 1:55 am
malakai wrote:well there went an hour I made a mistake and got a build error.

My mistake was in editing the file:

Code: Select all
ARM_LIBS=/opt/vc/lib


I had put ARM_LIBS=/opt/opt/vc/lib

so if your like me and get an error building it go back and check your edits on for try 2 this time I am trying on Berryboot wheezy should be the same but I did the first one successfully on the official untouched image. :mrgreen:



I did next one , I put INCLUDES="-I/opt/vc/include -Ivc/include/interface/vcos/pthreads" :oops:

Don't ya feel a prat though after doing it. :lol:

Pete.
Posts: 8
Joined: Sat Oct 06, 2012 12:03 am
by malakai » Sat Oct 06, 2012 2:39 am
I did next one , I put INCLUDES="-I/opt/vc/include -Ivc/include/interface/vcos/pthreads" :oops:

Don't ya feel a prat though after doing it. :lol:

Pete.


Completely :D

Ok so I am working on a tutorial to keep it clean I put this and it works is it a proper thing to do or will it cause headaches?

Code: Select all
I am going to try to clean it up by getting the game file into the root directory move the build files then delete the empty build directory:

    [b]mv ./build/release-linux-arm/ ./[/b]

    [b]rm build -r[/b]


I also am thinking of adding

Code: Select all
[b]touch start.sh[/b]

[b]sudo nano start.sh[/b]

Add the following:
[b]#!/bin/bash
sudo LD_LIBRARY_PATH=lib ./ioquake3.arm
[/b]


I like to keep typing to a minimum and want an article to teach as much as possible and typing ./start.sh is easy as Pi.

Tell me what you think

http://www.raspians.com/knowledgebase/quake-iii-arena/

And thanks Raspberry Pi Guy without you I wouldn't have this game most tutorials including the one on my post won't work.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by raspberrypiguy1 » Sat Oct 06, 2012 7:03 am
Please feel free to modify at your wish! I understand that I should of been a bit clearer about the Pak files and you could fix that... One little thing could you perhaps link it to my video of my channel? Thanks, it would mean a lot!

The Raspberry Pi Guy
14 year old Raspberry Pi tutorial maker, programmer, electronics tinkerer, fascinated by space & the ISS, Maths enthusiast. Oh... And the Raspberry Pi is awesome!
User avatar
Posts: 356
Joined: Sun Sep 02, 2012 7:01 pm
by malakai » Sat Oct 06, 2012 1:42 pm
Updated with video. Now to stop playing and get some work done. Going to try to get the PS3 controller to work with it eventually.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by FA-MAS » Sat Oct 06, 2012 2:41 pm
So this runs out of the user's directory? Is there any way to install it system wide like you would with the official instructions from id?

http://zerowing.idsoftware.com/linux/q3a/#install
Posts: 14
Joined: Wed May 30, 2012 10:51 pm
by malakai » Sat Oct 06, 2012 5:53 pm
FA-MAS wrote:So this runs out of the user's directory? Is there any way to install it system wide like you would with the official instructions from id?

http://zerowing.idsoftware.com/linux/q3a/#install


I don't know enough about making it official I guess we need to suggest putting it into the request thread.

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=12261

It sort of is on the list of wheezy packages. http://packages.debian.org/wheezy/games/
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by malakai » Sat Oct 06, 2012 5:56 pm
Does anyone know how they ported Quake3 to the Pi there is another game Smokin' Guns that uses the Quake Engine the files look similar maybe someone could port this too,

http://wiki.debian.org/Games/Suggested#Smoking_Guns

See this post if you can do something like this thanks http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=19298&p=188646
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by Hubertrum » Sat Oct 06, 2012 8:32 pm
Just successfully installed and it is running. Thanks for that. But the sound is a constant buzzing. I am using the analogue jack.. Any thoughts?

espeaks seems to work OK BTW
Posts: 29
Joined: Tue May 22, 2012 11:56 am
by malakai » Sat Oct 06, 2012 8:53 pm
Hubertrum wrote:Just successfully installed and it is running. Thanks for that. But the sound is a constant buzzing. I am using the analogue jack.. Any thoughts?

espeaks seems to work OK BTW


Does this work

sudo modprobe snd-bcm2835

I believe if it does you will have to run it before running Quake every time you reboot
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am