GreyBear's Quake 2 Tutorials

Welcome to the spot for budding Quake 2 programmers! Here you'll find a graduated series of C programming tutorials designed to introduce you to the ins & outs of programming Quake 2 modifications. The tutorials are written to help programmers learn the concepts behind the modifications covered, rather than present a cut & paste approach. The hope is to enable programmers working through these tutorials to take the concepts and apply them in totally new ways to create killer Quake 2 conversions.

7/6/98 - And you all thought I died... Ha!

I've been hard at work as the lead programmer for Navy Seals 2. I caught a break in the action, and have returned from the edges of code nirvana with new tutorials! These cover some unique things we're doing within NS2, and cover subjects not even thought of elsewhere! So hang on, folks, new tutorials comin' up!

Table of Contents

  • Chapter 1: Sabotage!

    • It's been brought to my attention that tutorial 1 has an unintended side effect. Sabotaging a weapon causes all weapons of the same class to become sabotaged. Further research reveals this is because all weapons of a class share a common g_item struct. A better approach, and one that would accomplish the objective of this tutorial better would be to create a new entry in the itemlist[] array to represent a sabotaged weapon, and then modify the use function for that class of weapons to cause damage to the user. Just be warned about what this mod really does so you're not surprised. Thanks to Rich Pelchat for bringing this to my attention.

  • Chapter 2: Medic!

    • I've updated part 1 slightly. I've moved the mos variable into the client_respawn_t struct instead of keeping it in client_persistant_t. The latter *does* get clobbered (although it's kind of hard to tell) between spawns. This change keeps your MOS across deaths without any additional code.

  • Chapter 3: Spawning Magic

  • Chapter 4: Creating Realistic Weapons

Questions? Suggestions? Ideas you'd like to see as tutorials?
Ask GreyBear, or drop by channel #dll