
Quake III Arena GPL Source Release (2012) - tosh
https://github.com/id-Software/Quake-III-Arena
======
hs86
And it is still there: [https://github.com/id-Software/Quake-III-
Arena/blob/dbe4ddb1...](https://github.com/id-Software/Quake-III-
Arena/blob/dbe4ddb10315479fc00086f08e25d968b4b43c49/code/game/q_math.c#L552)

More info:
[https://en.wikipedia.org/wiki/Fast_inverse_square_root](https://en.wikipedia.org/wiki/Fast_inverse_square_root)

~~~
senatorobama
How to get this good? :D

~~~
mhh__
Know your math (and floating point hacks, and ...)

------
glandium
I was bummed that there were no contributions in the 6 years this was open
sourced, but it turns out that active development is actually happening in a
fork: [https://github.com/ioquake/ioq3](https://github.com/ioquake/ioq3)

~~~
mathnode
It's the same story for Doom 3 engine / id-tech4. The most active fork I think
is still Dhewm3, which includes some modern useful changes for compiling.

* [https://github.com/id-Software/DOOM-3](https://github.com/id-Software/DOOM-3)

* [https://github.com/dhewm/dhewm3](https://github.com/dhewm/dhewm3)

~~~
nabc45
And Doom 1/2, which has which probably is the longest list of forks and ports
of any software ever:
[https://doomwiki.org/wiki/Source_port#List_of_source_ports](https://doomwiki.org/wiki/Source_port#List_of_source_ports)

~~~
megaman22
Well, Doom and Quake 1 are kind of in the sweet spot where they are still
small enough that one person has some hope of understanding the code base. As
impressive as the later IdTech iterations are, and as awesome as it is that
the code was released, they are daunting for a hobbyist.

------
jacobparker
I really like Quake 3's code. My favorite parts are:

\- The client/server network protocol and syncing state

\- The VM architecture (e.g. most of the game can be compiled by LCC into a
custom byte code and interpreted. This was for safely (although I wouldn't be
as sure these days) distributing mods iirc. I think the main game was shipped
compiled to x86 though. The interface between the VM and the core stuff is via
"syscalls" and its fun to see how that's wired up.)

\- The player physics/controls (i.e. walk/jump/collisions/etc.) (it's neat how
fake first-person player physics always is. This isn't unique to quake 3 but
quake 3 had notably good controls.)

It's a bit fun to trace what happens on 'w' keydown/keyup (when bound to walk
forward.) When I first saw how that actually worked I was surprised (hint: it
types commands invisibly into the command console ;) lots of string copies to
do that.)

~~~
jacobparker
A random thing I just remembered:

[https://github.com/id-Software/Quake-III-
Arena/blob/dbe4ddb1...](https://github.com/id-Software/Quake-III-
Arena/blob/dbe4ddb10315479fc00086f08e25d968b4b43c49/code/qcommon/msg.c#L1709)

They implemented adaptive huffman coding but ironically only use it during
static initialization, feeding it with static data (see the defn of msg_hData
a few lines up.) Note that the only calls to Huff_addRef are in the init, and
notice how it gets called - the loop over msg_hData[i]. I found that pretty
funny. I'm guessing there was some plans to use it adaptively but it's not
easy/obvious how to keep it in sync reliably...

------
nebulous1
Source review here:
[http://fabiensanglard.net/quake3/](http://fabiensanglard.net/quake3/)

~~~
shroom
This is one of my favourite games of all time! It has great atmosphere,
attitude, awesome mods and is well balanced. Thanks for this link it will be a
good read :)

~~~
lionel-
Are you talking about Half-Life? ;)

------
amatecha
This seems like a good time to mention the open-source Quake map editor
TrenchBroom[0] which is actively developed and supports Quake, Quake 2 and
Hexen 2 (with Quake 3 support on the way). It's very easy to work with and
heavily used in the Quake mapping scene today. Yes, there is a "Quake mapping
scene" still![1] :)

[0]
[http://kristianduske.com/trenchbroom/](http://kristianduske.com/trenchbroom/)

[1] [https://www.quaddicted.com/](https://www.quaddicted.com/) &
[http://www.celephais.net/board/](http://www.celephais.net/board/)

------
JepZ
Well, as far as I remember that doesn't include the assets, so to play the
actual game you still need the asset files.

Nevertheless, I appreciated the open source release very much back in 2005, as
it allowed you to learn C programming in a friendly way. Not just that testing
is like playing a game, but they have build a lot of platform independent
functions to provide cross platform support.

~~~
khedoros1
Yeah, but you ought to be able to use the assets from the demo.

------
zorkw4rg
looking at code like this in github always reminds me why I prefer spaces over
tabs, look at all that broken alignment:

[https://github.com/id-Software/Quake-III-
Arena/blob/master/c...](https://github.com/id-Software/Quake-III-
Arena/blob/master/code/ui/ui_players.c)

~~~
SquareWheel
And the counter-argument remains that you can customize tabs to whatever
length you want. Set "tab-size: 4;" in CSS.

~~~
taneq
That's the problem, though. People _do_ that, and then to indent 12 spaces,
your guy who uses 4-space tabs will put three tabs, your girl who uses 8-space
tabs will put a tab and four spaces, and your ace who uses only spaces will
put twelve spaces. And after a year of sharing code doing this, your
formatting will be farked and you'll spend half your time fixing other
peoples' "broken" indentation.

I have no issue whatsoever with using tabs in an editor, as long as it saves
them as spaces on disk.

~~~
iforgotpassword
You do not "indent 12 spaces", you have levels of indentation. If you indent
code only using tabs it doesn't matter whether you set your tab width to 4, 8
or 20, it will always display properly. Feel free to change your tab width
hourly, still no problem.

The only valid argument is that mixing spaces and tabs for indentation messes
things up, but that argument works both ways so doesn't support either side in
this never ending argument.

~~~
esrauch
It is trivial both to ban tabs and to bulk convert tabs to spaces in a
codebase or presubmit hook. The other direction seems impossible.

That means that if you want to avoid a mixed codebase it is far easier to get
to and stay at spaces only than tabs-for-indent, spaces-for-alignment.

------
magoon
I shouldn’t be, but I am amazed that a tabs-vs-spaces war broke out on this
particular story

------
stevefan1999
To be honest, I really wanted to see that one day, id Tech 5 and id Tech 6(66)
be open source as a contester and competitor for UE4, CE5 and Xenko Engine.

------
maaark
(2012)

~~~
wiz21c
And 958 forks !

~~~
anc84
957 of them just empty meaningless forks as Github users like to do.

~~~
ericfrederich
I wish there was a way to distinguish between real forks and forks that were
created for the sake of creating a pull request.

~~~
anc84
Or just discard all of them without any edits whatsoever.

------
AimHere
And if you need a tour guide to the Quake 3 source code (among others), Fabien
Sangard's blog will walk you through his favourite bits.

[http://fabiensanglard.net/quake3/index.php](http://fabiensanglard.net/quake3/index.php)

------
bsharitt
On the subject of id engine open source releases, was tech 4(Doom 3) the last
to get the GPL treatment?

~~~
ovao
The Doom 3: BFG sources have also been released, so _technically_ no. Doom 3:
BFG is essentially a hybrid of id Tech 4 and id Tech 5.

------
xyproto
This is old news. Please add 2012 to the title.

~~~
JepZ
Actually, it should be more like 2005:
[https://games.slashdot.org/story/05/08/20/1329236/quake-3-ar...](https://games.slashdot.org/story/05/08/20/1329236/quake-3-arena-
source-gpled)

