quake-iii-arena

id Software releases Quake III Arena source code id Software releases all source code for the classic PC shooter under GNU General Public License and hopes you'll make something cool.

To follow-up its success at the latest QuakeCon, Id Software has announced that they’ve released the source code for their classic PC first-person shooter title Quake III Arena. It is available on Id Software’s Github under a GNU General Public License.

The 5.6 MB download includes all all of the source code used in making the original game, and allows DIY programmers to freely create their own customized content or derivative games — but be mindful of the couple restrictions associated with the dependencies (outlined in the ReadMe file).

And yes, it‘s still in there:

/*
** float q_rsqrt( float number )
*/
float Q_rsqrt( float number )
{
	long i;
	float x2, y;
	const float threehalfs = 1.5F;

	x2 = number * 0.5F;
	y  = number;
	i  = * ( long * ) &y;                       // evil floating point bit level hacking
	i  = 0x5f3759df - ( i >> 1 );               // what the fuck? 
	y  = * ( float * ) &i;
	y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
//	y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed

	return y;
}
avatar
  Subscribe  
Notify of