Questions About Hl Engine
Wintergreen
Join Date: 2002-12-22 Member: 11369Members
Now I'm sure most of this is pretty basic to those of you who know how to code and such, but I think myself and a lot of other people would benefit from knowing some of these things, many of which I've been wondering about for a while.
First of all, the HL engine itself. Right. As I understand it, an engine is the core computer code at the center of every game--engines can be modified to make different games, but games built on the same engine share basically similiar graphics, the same limitations, etc... Now the HL engine is pretty old (not that I'm complaining, I probably wouldn't be able to play NS otherwise). My questions pertain to the "limitations I just mentioned."
1. Patches/ Updates (to the HL engine itself). These are released periodically to fix bugs and, occasionally, add new functionality to the engine, yes? By Valve? Does Valve still release patches for the HL engine or is it more or less a finished product? This leads me to...
2. Limitations. I.E. Hitboxes, flamethrower functionality, weapon caps. From what I've read, it seems that user created code has only been partially successful at best in overcoming these. Why? What is so difficult about enhancing/ augmenting an engine? It seems like with some things (I.E. NS itself) there have been all kinds of things you've been able to over come, but with others it's like a brick wall. If you got a really good team of coders together, couldn't you just put in a lot of work and remake the hitbox system?
3. Now I know it's a lot more complicated than that. Maybe all of the code in the HL engine is more interlinked than I'm thinking of it as, and changing one thing leads to a whole new set of problems? <b>Is it illegal to seriously tamper with the code?</b> If <b>that's </b>the case, then when will it not be illegal. When copies of HL stop selling?
Thanks for taking the time to answer.
First of all, the HL engine itself. Right. As I understand it, an engine is the core computer code at the center of every game--engines can be modified to make different games, but games built on the same engine share basically similiar graphics, the same limitations, etc... Now the HL engine is pretty old (not that I'm complaining, I probably wouldn't be able to play NS otherwise). My questions pertain to the "limitations I just mentioned."
1. Patches/ Updates (to the HL engine itself). These are released periodically to fix bugs and, occasionally, add new functionality to the engine, yes? By Valve? Does Valve still release patches for the HL engine or is it more or less a finished product? This leads me to...
2. Limitations. I.E. Hitboxes, flamethrower functionality, weapon caps. From what I've read, it seems that user created code has only been partially successful at best in overcoming these. Why? What is so difficult about enhancing/ augmenting an engine? It seems like with some things (I.E. NS itself) there have been all kinds of things you've been able to over come, but with others it's like a brick wall. If you got a really good team of coders together, couldn't you just put in a lot of work and remake the hitbox system?
3. Now I know it's a lot more complicated than that. Maybe all of the code in the HL engine is more interlinked than I'm thinking of it as, and changing one thing leads to a whole new set of problems? <b>Is it illegal to seriously tamper with the code?</b> If <b>that's </b>the case, then when will it not be illegal. When copies of HL stop selling?
Thanks for taking the time to answer.
Comments
HL is derived from the quake 1 engine. Heavily modified of course.
The last patch was the 1110 patch, so far there hasnt been one for a fairly long time, so my guess is that it's fairly complete and that we probably wont see another patch ever again.
Hitboxes are hardcoded into the engine. Crouching marine, standing marine, and the Onos (Gonarch?) are the three hitboxes that the HL engine can support.
Modifying engine code is illegal without valves permission. You have a license to use the engine, but not modify it. You do not own any part of the game you bought, you just bought the license to use it.
Modifications to the HL engine can be bought from valve. IE, you pay X amount of dollars, and valve lets you modify the engine. Where X is a 4 to 5 figure number.
Flamethrowers are a sticky issue. One can get an FT working, but there are several problems.
One looks. Ever played TFC? Ever seen It's flamethrower? Yep. Ugly as hell.
On the other hand, there is the performance issue. A working way to make the flamethrower get in and running is to use a bunch of particles. The problem here is the intense amount of lag that would create, especially with more then 2 or 3 in game...
I think I've covered everything...
The problem with hitboxes, are that all of them are just a gordan freeman trapped inside something. TSA marines, onos, fade. But for lerks, fattehz and skulks, there is a crouching gordan inside.
Thats interesting..
However, the Onos isn't a trapped gordon freeman hull, it's much taller and could be filled out to the sides lots more if it didn't mean the onos would be nigh on unmanouverable =P
As for half-life engine itself, if you want to use the engine just download the sdk for free, this'll allow you to make modified dlls that the engine hooks into to get all the rules and specifications of what it does. You don't need anyones permission, it's easy to get and all you need is something along the lines of Microsoft Visual C++ Studio (standard compiler for a lot of people though some use borland) to open and re-compile the files. The legal fluff only kicks in if you try and make money on it or claim any kind of rights to something involving the engine (in which case you'll get a legal bum-kicking) <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
If you wanted to take it further and mess with a few of the core parts of the engine (most are actually in the dlls you use to make mods though there's still a few things hidden in parts you're not given... like the flashlight code o.O ) then you'll really have to probably ask valve and possibly slide over a few notes to their wallet.
Remeber the distinciton between HULLS and HITBOXES.
Hulls are very limited, you can only have 4 in a single level (1 is size 0, used for checking for leaks in the level, the other 3 can be modified to any dimensions, but you can only have 3 to play with). Hulls are used for determining where you can/cannot move. When you run into a wall, you stop because your hull is in contact with the level geometry.
Hitboxes are much more open for modification. They are a property of the models, and are used to determine if a bullet 'hits' you. The problem is that hitboxes only 'count' if they are <i>inside</i> a hull. Basically the engine goes in this order:
player 1 fires a bullet along trajectory x.
Does trajectory x intersect any hulls before it intersects level geometry?
Yes:
-----Does trajectory x intersect a hitbox?
-----Yes: Do whatever the weapon does
-----No: Do nothing
No: Do nothing
Because the Onos hull is actually the same as a standing marine, even though the hitboxes of the onos cover his head, butt, legs, etc. the onos will only take damage if a bullet goes through the middle 1/3 of his body (because thats where the hull is).
If the NS dev team were able to go into the HL engine and have the code check if it intersects a hitbox right away instead of only checking if it already hit a hull, then all our problems would be solved. But as it stands, because NS uses VERY different sized player models, and only 3 hulls can be used, many of the alien models have areas where they take no damage (because the hitbox is there, but the hull doesn't reach that area). This is most notable on the Onos, but it also applies in a more limited extent to all the aliens.
Actually, there was a new version of HL released just a short while ago....
the version HL available from steam is version 1120.
Or does the game check for leaks when the map is loaded.
Oh well.