Welcome to the tutorials section. Here you'll find an ever-increasing collection of step-by-step tutorials showing you how to do all sorts of weird and wonderful things with quake3.
We've written these tutorials assuming that you're new to quake3 coding. We recommend that you start at the first tutorial (the first 5 or so are easier than the rest) and code each one for yourself. The best way to learn about quake3 coding is by browsing the code and making the changes yourself. After you've done all the tutorials you should be ready to code your own mod !
The tutorials here have been contributed by both the staff at planetquake and people from all over the quake community. (Thanks to everyone who has contributed !) If you have a great tutorial idea yourself, why not send it in ? Check out our submission page for how to do this.
If you spot an error in a tutorial, please email the author directly. If you have questions regarding quake coding (or getting your compiler to work or similar problems), PLEASE read our Help!!! page first.
Below you'll find a description of each tutorial. Good luck, have fun and remember - "West si-ide".
Welcomes you to mod making. Gets the motivation going for writing your own, starting with
that all important good idea. Includes a reminder to eat and bathe occasionally - by the
author of Rail Arena.
Covers all you need to do to use Microsoft Visual C++ for building and modifying
the Quake3 source. Covers where the DLLs' will compile too; and how to build the bytecode
for the virtual machine.
First test of your compiler. Creates the "slow rocket" modification described in the
source release notes. Don't forget to remove it afterwards!
Quake 3 on speed! Another quick modification that makes every player and bot run as if they
had the haste rune. Searches through the source code to find references.
Give Xaero hell! Changes the source code so the railgun goes through walls. A working
example of how to use vectors.
Shoot yourself in the back! Introduces a new console command for enabling/disabling
bouncing rockets. Shows how to use an existing feature of the code rather than writing
Tutorial#7: "Cloaking" by AssKicka
Adds another console command for a cloak device that decreases health when used. An excellent
example of "consequences"; or how to make sure the changes you make don't "break" the game.
Tutorial#8: "Ladders!" by Calrathan
Replaced by jump pads, you can now put vertical ladders back in. Uses friction to hold you in
place, and covers the simple map changes required to activate the code. A good
introduction to movement modifications. There's also a strong reminder that both client
and server need to be in sync.
A quick delve into the menu user interface and the built in server browser. After
helping you understand the browser code, it adds a button that allows you to add a
favourite server without connecting. Along the way we'll fix a bug in the browser code.
Tutorial#10: "Flame Thrower" by AssKicka
A big tutorial - not for the faint hearted! Covers what you do to add a new weapon into
the game. In this case it's the flamethrower from AssKicka's SolidGround mod. Lots to do here:
referring to shaders, models, and graphics in the source code.
These vortex grenades will suck in a nearby player and then explode. There's some
nice vector use here (in a useful function called G_Suck). You could easily modify this
function for other uses and call it G_Blow (eheh). And a handy findradius function is in
this one too.
Tutorial#12: "Grapple" by Matt Ownby
The grapple was actually coded into q3 but they chose to disable it before
releasing the game. No worries, Matt Ownby has managed to unleash it. Works fine
in ctf too.
For the nostalgic quake players out there, relive those quake1 dm3 discharge moments.
This one defines a new lightning discharge 'event' and 'meansOfDeath' and shows how the
game and cgame qvm's work together.
This is an advanced locational damage implemention - not only does damage vary according
to the height you hit them (above shoulders, body, legs etc) but direction is important too -
a frontal face shot does a whopping 5.0x damage. Nice use of vectors for determining 'where
did the shot come from ?'.
Tutorial#15: "Leg Shots" by McBain
A follow-on from a locational damage tutorial, this one slows down a player when the
are shot in the leg. A player regains their speed by dying (Duh!) or grabbing a health pack.
This is a very useful tutorial that should be standard for all new mods - it allows
a player to define an intelligent weapon switching order. Each player in a game can have their own
ordering (which is displayed when each level loads). Get to know all the functions for
switching next/prev weapon, running out of ammo, picking up weapons etc.
An adaptation of the scoreboard so you can see your frag-rate. Allows a fairer comparison when you join
a match part the way through.
An extension to the Vortex Grenades tutorial. Grenades now accelerate the player.
There is an emphasis on improvements and tweaks to the original tutorial.
Fed up of being a missile magnet? Become the Riviera Kid and hold your own by
shooting them down. Inspired on an old Q2 QDevels tutorial, it's
been updated to Q3 by Lancer!
An article that shows just how simple it is to get classes code up and running!
Includes a mini example with railgun, BFG, and lightning classes based on chosen model.
Complete your mod with a cinematic quality scrolling credits list. A total replacement
for the original static Id credits page, including full source for download.
Tutorial#22: "Weapon Dropping" by [SuB]paranoid
An old favourite that greatly enhances teamplay. Don't know why it was missing from Quake 3,
but now you can put it back in!
A neat little tutorial that'll make you feel like you're walking on the moon.
You may want to extend this in your mod by adding s/fx and power drain.
Puts a useful scoreboard in the HUD display... so you don't have to stop fragging
to see how you're doing!
You can use this as a basis for any scoreboard related information that you want
to display on the HUD. The size of the HUD scoreboard flips to a smaller font when
there are a large number of players.
Shows how to add a flashlight and laser aiming dot into Quake 3.
Conceptually each item has behaviour that differs only in the way it's drawn on screen, and
this tutorial shows how strongly related ideas can (and should!) use the same code.
A sweet tutorial for left, right, or central weapon positioning. While
the old Q2 weapon positioning affected aiming, this effect has gone with Q3A's accurate
reticule. You can now put visual weapon positioning back in and go on a nostalgia trip!
Those of you that want a touch of realism, the need to prepare for combat,
or the terror of finding you're unable to fire for a few moments, will want
to add this to your mods.
Almost exclusively a server side mod, there's also a simple little HUD modificaiton
that adds data on clip information.
A sweet little client side tutorial that replaces the standard Q3 zoom mode with
a smooth zoom in, in the same style as Unreal Tournament.
You can use this tutorial as the basis for a sniper rifle, or just to improve the
existing zoom mode.
The only kind of doors you've been able to use
in Q3 so far were sliding Star Trek ones - until now!
Realism mods and original projects can make good use of rotating doors,
just take a look at Half Life. All mod coders should implement this
rotating door code: independent map makers can then use this
kind of door if they want. Although the modifications to the source code are extensive,
they're all localized into a few files and large chunks of code, rather than
lots of fiddly changes all over the place.
Included in the tutorial is a link to a test map and map source, so you don't have
to fiddle around with Q3Radiant to test the code.
This tutorial covers the nasty business of removing the head part of the player model.
Continuing on the Unreal Tournament theme, it wraps this up into an
implementation of the "headshot!" kill, using the railgun.
The blood thirsty amongst you are going to love this!
This tutorial provides a skeletal framework for adding an alternative fire mode
for weapons. It gives you the same advantages that existing weapons have: instant
starting up of animation in the client, server side damage and effects, and
access to the prediction code in bg_pmove.c.
There's also some info on how to test your mod on a server if you don't have a
network, or access to an Internet server. Finally, there's a simple test
to show you what the problem was in the first place.
Tutorial#32: "Popup Menus I" by HypoThermia
Ever wanted to add a simple dynamic menu system to your mod? This code gives you
the framework for a popup menu system that works in-game. The menu pops up on a simple
key bind, and allows you to structure related commands in recursive sub-menus.
Tutorial#33: "Popup Menus II" by HypoThermia
The framework in part I needs a working example to flesh it out. This adds a full bot
command menu system, for use in Team DM or CTF games. There are also some helper functions
that get you access to information usually under the control of the server.
Beef up the grenade launcher with a rather nasty area effect: grenade fragments that explode
on contact! Inspired by the tutorial at QDevels, this is part of the
MaxCarnage mini-mod provided
by Chris for the benefit of all.
Tutorial#35: "Homing Rockets" by Chris Hilton
Watch your enemies *squirm* as they try and evade these missiles! More code from the
MaxCarnage mini-mod donated by Chris to Code3Arena.
Enhance the strength of the weapons in your mod with a powerup that triples the number
of shots! Taken from
SmashV2 mod donated to C3A by Hal9000.
Include the railgun Instagib gameplay into your code. Includes hiding of items,
and how to keep bots moving around the map.
Extend the available entity movement types with this nifty tutorial. There's a detailed discussion
of the do's and dont's in creating a new type, as well as an example of a first version that didn't work
Another take on the Instigib game type, this moves all the code changes into the server.
It touches the AI code changes needed to keep the bots moving around the map, and
enables RailCTF play too.
Make your grapple do more for your mod, taken from the Q2 inspired
PureCTF ModSource code. This tutorial shows how to optionally enable the
grapple, implement a fast mode, fix some problems with jump pad
prediction, and enable bot usage.
Tutorial#41: "Unlagging your Mod" by Neil "haste" Toronto
When you're done adding this code to your mod you'll find all players
will have a level playing field with hitscan weapons. It removes one of
the biggest issues between high and low ping players.
The meat of the tutorial covers the difficulties introduced by timedelays
between the client and server - the bane of HPB's everywhere. It's well
written and very accessible: you'll have a clearer understanding of code
and issues that usually leave big headaches.