Monday, January 7, 2013

GreyBear's Quake 2 Tutorials Chapter 4: Creating Realistic Weapons

This is another great tutorial. I am getting a feel for the quake 2 engine with these tutorials. This tutorial is broken down into 3 parts. Part 1 brings a pistol into the game to replace the blaster. One problem that I had with this part of the tutorial was with this line of code
//
//
#define MOD_Mk23      34
//
//
the problem is that you cannot use 34 for the Mk23 because 34 is in use by another MOD. so you have to change this to 35.
There is a zip file with additional resource that I downloaded and extracted into my baseq2 folder. make sure that you add the folders inside the zip file to the baseq2 directory (models, pics, sounds) and not the folder directory above them.

Part 2 is a tutorial for firing and reloading the pistol that was introduced in part 1. I am not sure which version of the quake2 engine was used for these tutorials but I am following along with version 3.21. In this version the "PutClientInServer()" is slightly different than the one used in the tutorial. When you are modifying the "PutClienntInServer()" place the following code close to the bottom of entire function:
//+BD   ...and set the max clip size, then fill the current mag...
client->Mk23_max = 12;
client->Mk23_rds = client->Mk23_max;
//+BD end add


Part 3 will allow you pistol to fire flares. This tutorial worked the for a while. I left and came back and the pistol would no longer fire flares. It would play the fire animation, but no flares came out.

part1
part2
part3

Sunday, January 6, 2013

GreyBear's Quake 2 Tutorials Chapter 3: Spawning Magic

Unfortunately I was unable to get this tutorial to work. I kept getting syntax errors in this error:

error C2143: syntax error : missing ')' before '*' b_check.c

in the following line of the "b_check.c" file:
//
//
void CheckItem(edict_t *ent, gitem_t *item)
//
//
http://www.quake2.com/dll/tutorials/gbtut3.html

GreyBear's Quake 2 Tutorials Chapter 2: Medic!

Great tutorial. I did not test all of the features that this tutorial provides beacause I am only one player.

part1
part2

Saturday, January 5, 2013

GreyBear's Quake 2 Tutorials Chapter 1: Sabotage!

This is a good tutorial that works. I found one issue. When you get to the point where you need to write this code :
//
//
T_Damage(ent, ent, ent->owner, ent->velocity, ent->s.origin, ent->s.origin, 25, 0, 0);
//
//
you will discover that you do not have enough arguments for the T_Damage function. I resolved this issue by just adding an extra parameter at the end :
//
//
T_Damage(ent, ent, ent->owner, ent->velocity, ent->s.origin, ent->s.origin, 25, 0, 0, 1)
//
//
. This tutorial features using command line options to modify how quake2.exe executes. I am using Visual Studio 2008, in order to debug while still using these command line options you can add command line options as an automatic part of the visual studio 2000 by left clicking of the quake2 project properties>>Configuration Properties>>Debugging and entering them in the Command Arguments field. I entered : +set deathmatch 1 +map base1. While debugging quake after it compiles quake opens in a deathmatch using map base 1.

GreyBear's Quake 2 Tutorials Chapter 1: Sabotage!

Lets begin

I have begun Quake 2 development in order to familiarize myself with the famous open source id tech-2 game engine. Why quake 2? I initially wanted to develop for doom but could not find the source for the doom's engine (id tech-1)that could be complied on my computer (windows 7). The id tech-2 source available on github https://github.com/id-Software/Quake-2 will not compile on my computer. I was able to find another link to the id tech-2 source that will compile on my computer with microsoft visual studio 2008 from this website http://fabiensanglard.net/quake2/index.php which provides this link : ftp://ftp.idsoftware.com/idstuff/source/quake2.zip. The website which provides this link also provides troubleshooting help which i had to utilize. However, in addition to those troubleshooting steps I also had to manually tell each project under the solution where the include directory for the direct x sdk was. This is accomplished by right clicking each project Properties>>C/C++ and pasting the absolute path to my directX sdk include directory. Mine looks like: "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include". When I built the project The executable was one directory higher than the directory of the source itself. To start the game just paste the baseq2 folder from you copy of the quake 2 game (i got mine from steam)into the same directory that the executable is in. Now that I have the source and resources I can begin modifying.