Skip to main content
GameDev.net gamedev.net
🔒 Locked

Quake2 source walkthru/tutorial

Started by mond May 25, 2003 at 3:38 PM 0 replies 850+ views
Original Post
mond
mond
Does anyone know of a good overview of the full Quake2 source? Some kind of a walkthrough or overview of the source would be nice. Or maybe a tutorial on how it''s all put together.
Aldacron
Aldacron
Yeah - the Quake2 source

Seriously, I don''t know of any tutorials that break the code down into ''step-by-step this is how it works'' bits. One place you can start is quakesrc.org. There you''ll find links to modified quake/quake2 engines, tutorials on how to make some modifications yourself, and a few other goodies.

But to actually understand how the it all works, my advice is to follow the flow of the code. If you go into, for example, the file /win32/sys_win.c and find the WinMain function, you''ll see two function calls that should stand out - one to QCommon_Init and another to QCommon_Frame. QCommon_Init is called once while the app is starting up, and QCommon_Frame is called repeatedly in the windows event loop.

The next step is to find these two functions in the source. they are both located in /qcommon/common.c near the end of the file. By following the function calls in these two functions, you''ll begin to get a clear picture of how the game is structured. From there, you''ll have to examine the functions individually to break down what exactly is going on.

It will take time and patience to go through it all. And if you don''t have a background in 3D you will have to do some research to understand some of the code. But it is well worth the effort.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.