gamer's guide
the guide the glossary who's who

 

DLL Basics

definitions:

compile:: to compile a program is to take the source code and make it into something that can be run or used.
patch:: aka mod (modification), addon. a patch is a modified "gamex86.dll" that changes the gameplay in quake II.
source code:: plain text that does do not anything until it is compiled. source code is meant to be read and understood by humans, not computers. Quake II's gameplay source code is freely available, but the rest of Quake II's source code is not.

The Quake II equivalent of classic Quake's Quake-C, DLLs offer players the opportunity to modify Quake II's gameplay. A modified DLL, or dynamic link library, may simply add new weapons or change the game entirely. DLLs offer more power, speed, and flexibility than Quake-C, but may sacrifice security and portability.

When id software created Quake II, the game was divided into two basic components, the gameplay DLL, and everything else (graphics, multiplayer code, etc.). id released Quake II's gameplay source code on December 11, 1997. With the files id software released, players can compile the source code to create their own gameplay .DLL, usually named "gamex86.dll"

But what is a Dynamic Link Library anyway? When Quake2.exe starts, it looks for gamex86.dll, which contains the gameplay code. Even though the gameplay code is in another file, Quake2.exe does not care and can run the code in the DLL as if it were part of the Quake2.exe. The advantage of having the gameplay code in a seperate DLL file is that players can modify the gameplay DLL without having access to the main Quake II executable (which contains proprietary graphics and multiplayer code).

If Quake II is Frankenstein, then gamex86.dll is Frankstein's brain. Much like the monster's brain, you can easily "plug-in" a new DLL which alters the way the game (or the monster) works.

But, like brains, DLLs are not always compatible with their hosts. For example, "gamex86.dll" is named as such because it can only run on x86 systems (486, 586, etc.) The DLL must be re-compiled for different operating systems like linux.

Another disadvantage to DLLs is the possibility of security problems. Taking a lesson from Shelley's Frankenstein, some players are cautious to download DLLs, fearing the creations will go haywire. Since DLLs have total access to system functions, they can do whatever they wish. While one DLL may write player information to the hard drive, a malicious DLL may scramble files or delete information.

In an effort to put fears to rest, OpenQuake was formed. OpenQuake is a group that "manually" verifies a mod(ification)'s source code, checking for malicious code. Patches that pass earn the OpenQuake "seal" of verification. Other mod makers simply release mods with their source code, in the GNU tradition. Still others point out that netizens download plenty of software without fear of malicious intent. Harmful mods, they say, will quickly be discovered and deleted since news travels fast. As yet, there have been no reports of malicious mods.

In any case, if you want to move from player to mod developer, you first need a compiler. A compiler translates the source code into machine-usable form. There are several commercial compilers available, such as Microsoft Visual C++, which id used, or Borland C++. Freeware compilers, such as LCC-WIN32 or Cygwin32, are also available.

Although Quake II's game logic source code was programmed in the C language, it is possible to use another language like Delphi which produces DLLs. Programming knowledge is necessary for mod development and is beyond the scope of this document. For more information on compiling DLLs, C tutorials, and DLLs in general, visit Quake DeveLS, inside3d.com, or quake2.com/dll/

[Basics] [Servers] [Beyond basics] [Other versions of Quake] [Sources of information] [Citizenship] [Quake C] [Level editing] [Mods] [Quake derivatives] [Operating Systems] [Guide News]

Last update: December 29, 1997
This page is maintained by kolinahr