Starting coding for HL2

  • Thread starter Thread starter Wiz
  • Start date Start date
W

Wiz

Guest
Hi everybody,

I'm very interested in learning how source works and how to code for it, as a group of friends and I decided to commit ourselves to a HL2 mod in the nearby future. I'm a computer science student and coding is not totally new to me, but I'd still like to know how dirty it can get, for example when coding something with a gameplay as complex as that of team fortress or natural selection.

Also, I'd like to know if there's a better method to learn how to program mods for HL2 than the typical "take a deap breath and dive into the code and docs". I found a few tutorials out there but I have no way of saying which ones are good.

Thank you very much,
Wiz
 
Nope - there's no way around the fact thats it's hard work :)
 
Wiz said:
Hi everybody,

I'm very interested in learning how source works and how to code for it, as a group of friends and I decided to commit ourselves to a HL2 mod in the nearby future. I'm a computer science student and coding is not totally new to me, but I'd still like to know how dirty it can get, for example when coding something with a gameplay as complex as that of team fortress or natural selection.

Also, I'd like to know if there's a better method to learn how to program mods for HL2 than the typical "take a deap breath and dive into the code and docs". I found a few tutorials out there but I have no way of saying which ones are good.

Thank you very much,
Wiz

Valve provide great comments for their SDK's, just work through it looking at the comments and cross-checking them with the code. You'll pick it up eventually. If you're making a mod and you want to adjust the players viewing height for example you could probably just find the code that sets that and change it in the SDK.
 
Changing values around is easy stuff, but when it comes time to add new functions for the game, you find out there's alot more work involved than a first glance would lead you to believe. Getting familiar with the SDK is great for starters; knowing which .cpp files focus on what, seeing what kind of functions the header files come with, ect.
 
is knowledge of opengl any useful when coding graphics for hl2 mods? I know it's dx9, but maybe there are ovelapping concepts.
 
Wiz said:
is knowledge of opengl any useful when coding graphics for hl2 mods? I know it's dx9, but maybe there are ovelapping concepts.

The engine handles most of the rendering itself. Modding is more about changing the gamerules than the render effects, although a knowledge of shaders can come in handy for some nice eye candy :) (ryhme completely unintentional)
 
Wiz said:
is knowledge of opengl any useful when coding graphics for hl2 mods? I know it's dx9, but maybe there are ovelapping concepts.

Well all of the API stuff was coded in the source code. Unfortunately we don't have access to the full source code with the SDK, only a top level view of it.
 
Back
Top