Quake 3 Source Code...

Started by
43 comments, last by SippyCup 18 years, 6 months ago
Hi Promit,

would you mind pointing me to the files dealing with collision detection and responce between a Player/Bot entity and the BSP map (narrow phase)?

Thank you very much for your help [smile].
Advertisement
Looks like all of the relevant collision code resides in code/qcommon/cm_local.h and code/qcommon/cm_trace.c. There's also code for curved surfaces in code/qcommon/cm_patch.h and .c.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Promit: Left a comment on your site about the Quake VM with some links and such in it. Clicked the wrong button and showed up as "Anonymous" though >_<

Anyways, I wanted to say keep up the good work with the articles! I've found them very educational thus far!
// The user formerly known as Tojiro67445, formerly known as Toji [smile]
Quote:Original post by Promit
Looks like all of the relevant collision code resides in code/qcommon/cm_local.h and code/qcommon/cm_trace.c. There's also code for curved surfaces in code/qcommon/cm_patch.h and .c.


Checking it out now, thanks!
There is some interesting Windows API code in win32/win_syscon.c and win_wndproc.c, including code about the mousewheel, and a function that maps Windows keys to Q3's keynumbers (int MapKey, line 147). From what I can tell, the Sys_CreateConsole function (line 295 win_syscon.c) is initializing member data of the WNDCLASS structure and registers it as a class, so apparently the console is a Window class by itself. There is also some code in that function about the fonts used in the console, stuff like that. Pretty interesting.
Quote:Original post by SippyCup
There is some interesting Windows API code in win32/win_syscon.c and win_wndproc.c, including code about the mousewheel, and a function that maps Windows keys to Q3's keynumbers (int MapKey, line 147). From what I can tell, the Sys_CreateConsole function (line 295 win_syscon.c) is initializing member data of the WNDCLASS structure and registers it as a class, so apparently the console is a Window class by itself. There is also some code in that function about the fonts used in the console, stuff like that. Pretty interesting.

Perhaps this refers to the console that shows as you start the game?
I have kind of a general question for anyone who knows the answer.. What I want to know is exactly how graphics resources go from code to the screen. I know (or at least I'm making an educated guess, there's a chance I'm not right :P) that the renderer handles this, but I'm wondering if the actual rendering is done through an API or what. I know it can be done with APIs (DirectX, for example), but I guess my question is can it be done WITHOUT an API, and how does Q3 do it?
I downloaded it but haven't looked at it yet. But I am not surprised by your confusion. John Carmack is an excellent programmer, but man is his code ever a mess! I remember the Quake 2 source being indesipherable.

But I think you have a great idea. I'm currently trying to deal with some Windows messaging problems so I might have to take a peak at how they handled it.
Quote:Original post by SippyCup
I have kind of a general question for anyone who knows the answer.. What I want to know is exactly how graphics resources go from code to the screen. I know (or at least I'm making an educated guess, there's a chance I'm not right :P) that the renderer handles this, but I'm wondering if the actual rendering is done through an API or what. I know it can be done with APIs (DirectX, for example), but I guess my question is can it be done WITHOUT an API, and how does Q3 do it?


Quake 3 uses OpenGL. Sure you can do it without an API, if you where allowed direct acces to the hardware, but that would mean your arn't using Windows. Or you could use a software renderer, but that would be incredibly slow.


EDIT: Q3 might have a software renderer. In case you don't know, a software render is where you do all the math yourself for the 3d (you need to know math anyways, to do things like move the camera around and a host of other graphics things but you don't have to know how to actually make a 2d screen show a 3d scene) and that means it's done on the CPU instead of the video card so thats why its slow.
______________________________________________________________________________________With the flesh of a cow.
Oh yeah, great job Promit.
If I havn't already: Rating++;
______________________________________________________________________________________With the flesh of a cow.

This topic is closed to new replies.

Advertisement