Quake 3: Arena Source GPL'ed
inotocracy writes "At John Carmack's Quakecon 2005 keynote he promised that the Quake 3 Arena source code would soon be released-- turns out he wasn't just pulling our leg! Today it was released, weighing in at 5.45mb, it makes for a quick download and a whole lotta fun. Developers, start your compilers!"
If you don't want to register, but also don't want a capped download: Demon FTP.
Remember, http://www.bugmenot.com/ to get the download at more than 50KBps without having to sign up.
I've been poking around the source since yesterday afternoon (late as usual slashdot) and it's generally MUCH cleaner than Q2. Things are well organized, categorized, and sensible. The id penchant for clumping a dozen header files into just one continues, but overall it's easy to find the code you're looking for. Hell, it took me 3 days to find the BSP code in Quake 2 because they had called it model_t or some such meaningless thing. I can see why Q3 was so popular for licensing, despite being in C. Indeed, it's some of the cleanest C code I've seen laid out to date. Naturally there are hacks here and there, and a few very weird design things...and the C versions of what would in C++ be inheritance and aggregation are hilarious. Overall though, I think this code is going to go a lot farther than Q1 or Q2 source ever did. Compared to everything else out of id, this source is really quite nice. No stretches of pages of uncommented assembly code. Most functions have documentation if it's not obvious what they do. All of the members of the major engine structs are well commented, for the most part.
In short, I like. 1 thumb up. (Hey, it's still C, and I'm a C++ guy in and out.)
Mirror
Never mind, here's a link for UK readers.
It's 5MB after it's been compressed into a zip. As you may or may not know, zip compresses text really well.
The uncompressed size of the source is just over 35MB.
Here's a link: http://www.filerush.com/download.php?target=quake3 -1.32b-source.zip
find lcc/src | xargs dos2unix
that's all you need
It's the first guess for finding an inverse sqare root using Newtons method. We're still waiting for a mathamatitian to tell us if it's the best choice, but it works. That's one of Carmack's claims to fame in the CS world.
"A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
This paper says that it was first found in the Quake 3 source. I guess it's in the SDK somewhere?
I wanted to add, too, that this is an example of why companies don't release code. They view things like this as secrets to be kept. Kudos to Carmack for having the confidence.
"A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
the reason why this code isn't in libc is because this code is an approximation (but a good one). suitable for games but bad for scientific purposes.
there are several reasons why this code exists in quake3:
1) it was written back before modern FPUs and SSE etc. nowadays doing square roots in hardware is faster, especially if you vectorize. but back in 1999 it wasn't.
2) it was written for mods to use in the quake vm (quake's bytecode interpreter). an engine trap may have been slower.
Tested on a Debian Sarge:
3 2b-source.zip
./unix/cons
/usr/local/games/quake3/baseq3/* ~/.q3a/baseq3/
./linuxquake3
# Get the code
wget ftp://ftp.idsoftware.com/idstuff/source/quake3-1.
mkdir q3a
cd q3a
unzip quake3-1.32b-source.zip
cd quake3-1.32b
# Transformation for UNIX
find -type f -exec dos2unix {} \;
# Compiling
cd code
# Result
cd install
find -ls
# Install the packs
# You needs to original files!
# I do not find them in the source.
cp -a
# Playing