View Single Post
Old 08-06-2004, 05:19 PM   #13 (permalink)
Ambershee
Senior Member
 
Join Date: Apr 2003
Location: Derby, UK / Den Haag, NL
Posts: 590
Default

Quote:
I don't know about this "stealing mods", since I am pretty sure the creators of CS and DOD made out pretty well from the deals they made. Hell from what I hear some of them actually ended up helping make HL2 itself...
The raw recruits of the current gaming industry are those with experience in the Mod Industry. As far as selling technology goes, Valve made a stupidly awesome profit from what they bought, with absolutely no need to do any development work themselves. Think what would have happened if Mr X. had purchased the source for Windows 3.1 from Microsoft for a tenner?

Quote:
For modding FPS games, you effectively re-code how everything works from scratch. In Half-Life you had to write your code in c++, compile it into a little dll then load it into HL.
Well, you don't have to re-write everything, or indeed anything, but you still need comprehensive grasp of the language that the source has been written in, and nit's very much not spelt out to you like configuration files, the way Generals works - here's an exert from what I wrote today for Dh3;

Code:
inline bool IsOrthoUniform (const Matrix44& b, float fTolerance = 0.01f)
{
	for (int i = 0; i < 3; ++i)
	{
		if (fabs(b.GetRow(i).GetLengthSquared()-1) > fTolerance)
			return false;
		if (fabs(b.GetColumn(i).GetLengthSquared()-1) > fTolerance)
			return false;
	}
	return true;
}

inline void OrthoNormalize(Matrix44& m)
{
	m.NoScale();
}

// given the bone matrix, returns its inverted.
// the bone matrices are orthounitary
inline Matrix44 OrthoUniformGetInverted (const Matrix44& b)
{
#ifdef _DEBUG
	for (int i = 0; i < 3; ++i)
	{
		assert (fabs(b.GetRow(i).len2()-1) < 1e-2);
		assert (fabs(b.GetColumn(i).len2()-1) < 1e-2);
	}
#endif
	return GetInverted44(b);
	Matrix44 m;
	m(0,0) = b(0,0); m(0,1) = b(1,0); m(0,2)=  b(2,0); m(0,3) = 0;
	m(1,0) = b(0,1); m(1,1) = b(1,1); m(1,2)=  b(2,1); m(1,3) = 0;
	m(2,0) = b(0,2); m(2,1) = b(1,2); m(2,2)=  b(2,2); m(2,3) = 0;
	m.SetTranslationOLD(b.TransformVectorOLD(b.GetTranslationOLD())); m(3,3) = 1;

#ifdef _DEBUG
	Matrix44 e = b * m;
	assert (e.GetTranslationOLD().GetLengthSquared() < 0.01f);
#endif
	return m;
}

Welcome to the world of advanced vector mathematics and complex matrices - the sort of stuff you'd be learning in a degree level math course. Needless to say, that function is the equivalent of a single ini "Wibble = 0.5"

Hope the exert wasn't too long, lol, it was the shortest one I could find quickly.

Quote:
Generals/ZH is sooo easy it's a dream come true . But then it's equally limited in what you can do too
Ease of use over adaptability, the common tradeoff. It's the same with Far Cry at the moment - you can easily modify it compared to say, Quake 3, but you'll be damned if you can do as much with it.
Ambershee is offline   Reply With Quote