What, there's no option for "Read Engine Source Code"? That's what I use. Well, most of the time I use a mix of things (usually whatever Google brings up). However, whenever I really need to know how things work, I use the source.

i use a mix of everything. although i will say i learn better if i have someone sit down and go through it with me. usually someone with a lot of patience cause i sometimes need a lot of explanations. so i use a mix of tutorials, peoples help, and reading through a lot of code. definitions for qc helps a lot too.

It helps if you have previous experience with another language. Either basic, pascal, C, or even something like javascript. The syntax is pretty easy. I started learning it though, before the source code was released so, docs were limited and there was a lot of guess-work about the inner workings of the Engine.

The main trouble I had in the early days was learning the flow of the program. There was always this dark cloud of uncertainty when things got executed. Specifically around the client.qc file.
It does help to pick up a mod that is already created that works and tinker with it for test; instead of starting off scratch. Once you learn the requirements for the client/server scheme and feel adept with the syntax and quirks, then you can start from scratch and focus on a new mod.
It also helps if you plan on making a mod to design the game on "paper", (notepad), get all your details and break down every aspect first. Not only is this easy to do, (you are writing pseudo code in english), it also keeps you motivated. As you do code the mod, limitations will define the end result.

I wrote a BBS door in the early 90s in Pascal, which seemed easier at the time, though it was my first time coding in pascal, the compiler let you execute the program and trace through the code so you saw your code line by line being executed, and where it would crash. QuakeC should have something like this built into the engine. If QuakeC coding was akin to programming on an 8-bit computer, (all code typed into the console), then i think there would be more modders, or atleast something fun to see

ceriux wrote:cant you just do that yourself kind of? just bprint each step of your code?

Stepping is not equivalent to bprint.
- There can be too much bprints to find what you want, stepping has always the corrupted path.
- There can be too steps to find what you want. But you should always try to make simplest error case.

Also, stack trace migh work better sometimes than bprint.
- Stack trace will most likely be dumped to a text file, so you can review it later.
- Console has limit on how much bprints it can show, they can be missing.
- There can be too much bprints to find what you want, stacktrace has always the corrupted path.

if the buggy code is resulting in an abort, bprint will not actually print. the same is true on dedicated servers.
using dprint instead, with developer 1 is fully reliable (developer cvar not needed for qw). -condebug or some such will always log it correctly.
most engines give you a stack trace with the error or objerror builtins.
some engines will start printing individual instructions when the traceon/traceoff builts are used.

singlestepping can be heavenly when it comes to understanding the flow of code, its much simpler than adding extra calls all over the place.