Quake Codexery

QuakeC

The custom scripting language that powered Quake modding.

QuakeC

QuakeC is a compiled language developed in 1996 by John Carmack of id Software to program parts of the video game Quake. Using QuakeC, a programmer is able to customize Quake to great extents by adding weapons, changing game logic and physics, and programming complex scenarios. It can be used to control many aspects of the game itself, such as parts of the AI, triggers, or changes in the level. The Quake engine was the only game engine to use QuakeC. Following engines used DLL game modules for customization written in C, and C++ from id Tech 4 on.

First Appearance
Quake engine source code release (1999)

Lore & Background

The QuakeC source to the original id Software Quake game logic was published in 1996 and used as the basis for modifications like capture the flag and others. QuakeC source code is compiled using a tool called qcc into a bytecode kept in a file called progs.dat. The programmers of Quake modifications could then publish their bytecode without revealing their source code. Most Quake mods were published this way. QuakeC is known as interpreted because as Quake runs, it is continually interpreting the progs.dat file. The syntax of QuakeC is based on that of the C programming language, explaining its name, but it does not support the implementation of new types, structures, arrays, or any kind of referencing other than the 'entity' type (which is always a reference). QuakeC also suffers from the fact that many built-in functions return strings in a temporary string buffer, which can only hold one string at any given time. QuakeC does not contain any string handling functions or file handling functions, which were simply not needed by the original game. Most video games at the time had their game logic written in plain C/C++ and compiled into the executable, which is faster. However, this makes it harder for the community to create mods and it makes the process of porting the game to another platform (such as Linux) more costly. Despite its advantages, the choice of implementing game logic using a custom scripting language and interpreter was dropped from the next generation Quake II engine in favor of compiled C code due to the overall inflexibility of QuakeC, the increasingly complex game logic, the performance to be gained by packaging game logic into a native dynamic link library, and the advantage of leveraging an already established programming language's community, tools, educational materials, and documentation. Distributing native code created new security and portability concerns. QuakeC bytecode afforded little opportunity for mischief, while native code has access to the whole machine. QuakeC bytecode also worked on any machine that could run Quake. Compiling to native code added an additional barrier to entry for novice mod developers. The eventual solution, implemented by the Quake III engine, was to combine the advantages of original QuakeC with the advantages of compiling C to native code. LCC was extended to compile standard C into bytecode, which

In Their Own Story

The console cursor blinks in the darkness of a test chamber. A single line of code, `void weapon_shotgun()`, hangs in the air like a promise. The developer types a new condition, changing the fire rate from a slow pump to a rapid burst. They compile the script, and instantly, the world shifts; the shotgun roars with a new rhythm, turning a cautious duel into a chaotic spray of lead.

Reader's Guide

A decompiler and a recompiler were released by Armin Rigo (called DEACC and REACC respectively). These programs were made through the process of reverse engineering, and were most likely published before the release of qcc. id Software released the source of qcc, their QuakeC compiler, along with the original QuakeC code in 1996. Modified versions soon sprung up, including Jonathan Roy's fastqcc and Ryan 'FrikaC' Smith's FrikQCC. These added functionality, optimizations, and compiling speed boosts. In 1999, when id Software released the code from Quake's engine under the GNU General Public License (GPL), the workings of the bytecode interpreter were examined and new QuakeC compilers were released, such as J.P. Grossman's qccx and a new version of FrikQCC. These compilers took advantage of newly discovered features in a backwards-compatible way so that the bytecode could still be properly interpreted by unmodified Quake engines. New features include arrays, pointers, integers, for loops and string manipulation. With the Quake engine source code now able to be changed, further features were added to QuakeC in the form of new built-in functions. Features long yearned for by QuakeC coders finally reached realization as QuakeC now had file and string handling functions, enlarged string buffers, more math functions, and so on. However, programmers taking advantage of these changes lost backwards compatibility with the unmodified Quake engine. Xonotic since version 0.7 uses the gmqcc compiler. Some enhanced Quake engines (notably DarkPlaces and FTEQW) have support for an extension of regular QuakeC (now commonly referred to as server-side QuakeC) that allows client-side-only scripting of the Quake engine, also abbreviated as CSQC (client-side QuakeC). This is especially useful for GUIs, HUDs and any visually heavy effects that do not need to be simulated on the server and transferred over the network.

Did You Know?

Frequently Asked Questions

What is QuakeC?

It is a C-like programming language created by id Software for modifying game logic in Quake. Released with the original game in 1996, it allows users to change enemy behaviors and gameplay rules without rebuilding the engine.

Who developed QuakeC?

id Software designed this scripting backbone specifically to empower the modding community alongside their engine. It was introduced when Quake launched in 1996 as a primary interface for game modifications.

What can you do with QuakeC?

Developers use it to alter entity logic, create new weapons, and implement custom game modes like Capture the Flag. This flexibility enabled the creation of entirely new experiences within the existing engine framework.

Why is QuakeC important to the community?

It served as the foundational tool that sparked the modding revolution for the franchise. By allowing deep customization without recompiling the full game, it fostered a massive ecosystem of user-created content.

Does QuakeC still exist in modern games?

While the original engine is legacy, the language's influence persists in successors like Quake II and Quake III Arena. It remains a historical cornerstone for how id Software enabled player creativity during that era.

More in History & Community

Elsewhere in the Quake universe

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →