PDA

View Full Version : Moving from Quake 3 style code to HL


Nith Sahor
31-07-2003, 01:25 AM
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

DOOManiac
01-08-2003, 10:02 PM
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

Zore
02-08-2003, 05:49 AM
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!

Emon
05-08-2003, 07:26 PM
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.

one
07-01-2004, 12:09 AM
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.

OCybrManO
07-01-2004, 03:12 AM
They did rewrite a lot of the code... but I'm not exactly sure what percentage was rewritten.

one
07-01-2004, 11:06 AM
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.

botman
07-01-2004, 02:57 PM
See this acticle on VERC...

http://collective.valve-erc.com/index.php?go=q1_or_q2

botman