Get started on QuakeC

Inside3D
 • Front Page
 • Articles
 • Downloads
 • Forums
 • Hosting
 • Help Wanted
 • Interviews
 • Reviews
 • Staff

 
Allied Sites
 - AI Cafe
 - Bot Epidemic
 - Dark Places
 - Flat Earth
 - FrikBot
 - Ghoulish Art
 - Kilbert3D
 - Quake Info Pool
 - QSG: Quake Standards
 - Rusted Fork
 - Stroggs Gone Mad
 - More...
 
Quake
 - Getting Started
 - QuakeC Specs v1.0
 - QuakeC Tutorials
 - Quake Mod Index
 
Quake II
 - Getting Started
 - dll Sourcecode
 - Coding Tutorials
 
.dll Central
 - Getting Started
 - Learning
 - dll Primer
 - dll in C
 - dll in Delphi
 - Compilers
 
Jedi Knight
 - Getting Started
 - COG Specs
 - Sound Specs
 - Tutorials
 
Level Editing
 - Tutorials/Tips
 
 
Telefragged!!!

Introduction

- Quake C is a programming language which John Carmack developed expressly for use with Quake. The semantics of the language itself resemble a stripped down version of C. Some Examples of Quake C modifications are new weapons, monsters, player skins, the possibilities are endless. QuakeC is everyone Quake Players dream come true...

What Do I Need To Get Started?

- The first step is to download the QuakeC Source code. Here I recommend the QuakeC 106, which has all the .qc files. If you are looking for fast compiling, I suggest FrikQcc 2.2. This is a customized version of qccx. It supports: goto, labels, static variables, new optimizations, compiler warnings, and many other features.

What Do I Need To Edit?

- When you come to the part where you should edit a .qc file, you can do this in a normat text editor. You can use DOS EDIT or WORD PAD. The only Text editor I know of that does't work, is NOTE PAD since it can only handle 64k files. (.qc files are usually bigger).

Setting up

- After you have edited a .qc file, and you have executed qccdos.exe IN the Progs dir, you will find a file named PROGS.DAT In the /quake/mygame/ directory. You can then exit to the root Quake dir, and run Quake with the-game mygame line, which will cause quake to look for data in the mygame directory before falling back to id1. You can then play with your patch.

Your Directory Sturcture

- Your directory structure should then look like this..

/quake/quake.exe
/quake/id1/
/quake/mygame/src/compiler.exe
/quake/mygame/src/world.qc
/quake/mygame/src/progs.src
/quake/mygame/src/... etc ...

Comments

- Comments are little notes used by a programmer in order to help others to understand his code. They do not affect the program at all if written correctly. There are two ways to denote comments in Quake C. One way is with doubles slashes (//). The double slash comment only works behind the slashes and on the same line. With every new line that you want a comment on you must include double slashes.

void () W_FireShotgun = // Hello this is a double slash comment
Another way to write comments are with the slash-star (/*). With this type of comment, every line after the /* is a comment until ended with */.

void () W_FireShotgun = /* Hello this is a slash-star comment This is still part of the comment */

Operators and IF Statements

- Operators are the little signs we usually find in IF statements. Signs like ==,>=,<, etc. here is a table of the important operators in Quake C:

"=="equal to
"!="not equal to
"="becomes
">="greater than or equal to
"<="less than or equal to
">"greater than
"<"less than

The basic structure of an IF statement is as follows:

if (condition)
{
        True-part;
}
else
{
        False-part;
}

Variables to Know

- Here is a table of the important variables to know in Quake C and what they are:

.healththe health of an entity
.ammo_shellsthe ammo(shells) of an entity (must have prefix like "self")
.ammo_nailsthe ammo(nails) of an entity (must have prefix like "self")
.ammo_rocketsthe ammo(rockets) of the entity (must have prefix like "self")
.ammo_cellsthe ammo(cells) of an entity (must have prefix like "self")
.classnamethe classname of an entity (must have prefix like "self")
.originthe origin of an entity (must have prefix like "self")







The Inside3D content and design is copyrighted by the Inside3D team, and may not be re-produced or copied without proper consent. All rights reserved. Any work credited to any author not part of InsideQC is copyrighted by that author. If you have any feedback, suggestions or flames please send it in to the author. Inside3D is hosted by telefragged and the design was originated by project-9.