Moving from Quake 3 style code to HL

Nith Sahor

Newbie
Joined
Jul 30, 2003
Messages
63
Reaction score
0
Hi,
I have been modding JK2 for quite some time now and I was wondering how similar JK2s or Quake 3's code is to Half-Life's and how somebody moves from Quake 3's code to HL's... like how do you communicate between the server and individual clients (like using the stats[] index or trap_SendServerCommmand in Q3A's code), and if there are any functions that are called regularly (like ClientThink_real() in g_active.c in Q3A's or JK2's source code).

Thanks,
Commodus
 
The main difference from the Quake 3 source is that HL (and I'm sure HL2 will be the same) is completely object oriented. Everything is encapsulated into a class.

HL does have Think functions and other function that are called at certain intervals. As far as server messages go, those aren't too hard either.

I don't know why schools spend so much time trying to point out the benefits of OOP when all they have to do is compare the two SDKs :P
 
DOOManiac said:
------------------------------------
I don't know why schools spend so much time trying to point out the benefits of OOP when all they have to do is compare the two SDKs
------------------------------------

LOL, I absolutely agree. But I have a better argument -- just observe the world!
 
I'm rather suprised JO isn't in CPP, as Raven converted Elite Force to CPP. I don't think SoF2 is in CPP either, quite odd.

Anyway, I doubt you could really port it, but most of the logic would be the same I bet, so recreating it can't be hard.
 
But I thought, Half-Life 1 uses a Quake engine. And Quake 1 and 2 are written in C. So Valve probably had to rewrite the whole engine in C++ and oop, if they wanted to make real object-oriented code.
 
They did rewrite a lot of the code... but I'm not exactly sure what percentage was rewritten.
 
I think, that the complet Quake engine wasn't very useful, if they really had to rewrite that much. Because they could have made their own with only a little bit more effort.
 
Back
Top