QuakeC is a scripting language developed in 1996 by John Carmack of id Software . She was developed to write parts of the computer game Quake . A programmer can use QuakeC to individualize Quake, for example by adding weapons, changing the logic and physics of the game or by describing new scenarios. It can be used to change many aspects of the game such as parts of the artificial intelligence , triggering events or the structure of the playing cards.
The QuakeC source code for the original Quake game logic by id Software was published in 1996 and was used as the basis for mods . QuakeC source code is compiled into bytecode using a program called qcc and stored in a file called progs.dat . The programmer of a Quake mod can then publish his modified progs.dat without having to publish the source code. Most of the Quake mods were released this way.
Despite bad reviews from many leading computer game magazines and despite the very popular, recently released computer game Duke Nukem 3D , QuakeC made Quake a trailblazer in the first-person shooter industry. Thanks to Carmack's idea of increasing the “lifespan” of computer games through unlimited expandability, an enormously large community of gamers and programmers that is still growing today has emerged.
The syntax of QuakeC is based - as the name suggests - on that of the programming language C , but is comparatively severely limited. For example, QuakeC does not allow the definition of new data types through structures or objects. QuakeC also suffers from the limitation that many built-in functions (functions that have a prototype in QuakeC but are defined in the game engine written in C ) that return text store it in a temporary buffer that is only can store a string . In plain English this means that a construct like
EineFunktion( ftos(Zahl1), ftos(Zahl2) );
does not work because the second call of the ftos function (which converts a floating point number into a string) overwrites the character string stored by the first call before a function can process it.
The list of flaws can be continued with the complete lack of functions that allow editing of strings or access to the file system, which the original game simply did not need. Even if other programmers could have used the functions, things like file manipulation were not implemented in order to avoid security problems when downloading foreign progs.dat files.
The game logic of most computer games is written in pure C (++) and is compiled into the game's executable file, which is faster than a scripted solution. However, this makes it more difficult for players to mod ( create a mod ) the games .
Modified compilers and syntax
As is the custom at id Software, the source code of qcc , the QuakeC compiler , was published in 1996 together with the QuakeC source code. Modified versions like Jonathan Roy's fastqcc and Ryan Smith's FrikQCC quickly appeared . They added functionality, optimizations, and speed improvements to the compiler.
In 1999, when id Software released the source code of the Quake game engine under the GPL , the mod community investigated the functionality of the engine's virtual machine and released new QuakeC compilers such as JP Grossman's qccx and a new version of FrikQCC. These compilers made use of new capabilities in a backward-compatible manner so that the virtual machine of the unchanged engine could still interpret the compiled scripts. New capabilities included support for arrays , pointers , integer variables, for loops and string manipulation.
With the release of the engine's source code, new functions could be incorporated that mod developers had missed for a long time. These included the already mentioned functions for string manipulation, access to the file system, enlarged string buffers, more math functions and so on. However, programmers who used the new capabilities lost compatibility with the unchanged Quake engine.