Learning the id tech 3 engine

2019/08/14 - games

I accidentally deleted this from Dev.to.

It was an incredible honor and privilage to read and study the Quake 3 source code. I attempted to fix an outdated port of ioquake3 to emscripten called quakejs. Someone else in the thread was able to get the new version of emscripten working. I challenged myself to learn more C code and the engine by updating the emscripten hooks to the latest version of ioq3.

Quake 3 browser

Quake 3 mobile

I created tons of branches while dissecting the code. Normally this would likely be done using tags, but I like seeing the tree of changes.

Quake 3 branches

I had to understand every line of the quakejs changes, and then systematically go back in the version history and learn why the code had changed. A lot of code was moved in a large renaming commit, so it was easy to port the changes. A big part of my confusions was learning how compiler templates work in C.

Template code

There are a lot of beautiful open source mods available for quake 3, it would be interesting to me to see what kind of changes these mods have implemented.

E+ portal mod

tutle mod

geoball mod

q3rally mod

unvanquished mod

It would be amazing to reintegrate the level editor in to the game engine like Time Splitters.

Time splitters