Modding with source SDK

  • Thread starter Thread starter Philibob
  • Start date Start date
P

Philibob

Guest
I've not long since started learning C++ (although I already have an idea of the basic programming principles), we've done functions and arrays and just started pointers, I'm trying to go ahead myself and learn classes as soon as possible.
What would be the best thing to try and learn after this to be able to make a simple mod? (DirectX or something else?)

EDIT - Not sure if I should have put this in general modding instead...
 
You should definatly learn and understand pointers. It's the more important programming concept in game programming. You won't really have to mess with the graphic engine so DirectX is not required but it can obviously help you, the more you code, the better you'll be.
 
Agreed, pointers is the way to go. Oh, and outside of programming, you might want to brush up on some of your physics, trigonometry, and maths, as most things involving the physical world of Half Life use these alot. If you're not at least okay with these, then you'll not be able to do much more than round timers, interfaces, and the like.

Glad to see people are finally pulling their fingers out and learning how to code, rather than asking others to do it for them. Philibob, I salute you :)

-Angry Lawyer
 
I'm not familiar with game programming, let alone maths & physics programming, so a small question about this:

Taken a normal XY-axis, the zero-point starts at the bottom left (normally), while the xy-zero point of a screen starts at the top-left of the screen.
In game-programming (as well as any other programming involving maths), do you always have to reformat math functions to display things rightly at a screen?
 
you definitely need to know pointers ... and the rules of classes and inheritence :)
 
Using the hud is easy. It is split into (I could be wrong on this) a 800x600 matix, no matter what res the user is in. You can refer to any point in this matrix to draw your object from.0,0 bottom left to 800,600 top right. As for drawing things in the game world that is another story I will not going into at this stage (becuase I hardly understand it myself)

As for what to know to program a mod.

Classes - Know how a class works, how to make your own - Im guessing 95% of mod code will be interfacing with defined classes in the source eninge.
User defined type - From what I have seen with the source engine it has a lot of user defined types.
 
I understand C++ (Well any programming language, minus the assembly and machine :P) (I can read and interperet code, but I'm not that great at coding). But, I cannot for the life of me think of where to beging with game programming... Just wondering if someone could tell me? Heh :/
 
Orion.Instrument said:
I understand C++ (Well any programming language, minus the assembly and machine :P) (I can read and interperet code, but I'm not that great at coding). But, I cannot for the life of me think of where to beging with game programming... Just wondering if someone could tell me? Heh :/
I don't think there is THE one way to start game coding.

You need to learn some OpenGL of DirectX programming, then tie these together.
Afterwards you have interpreting bsps, networking, creating AI, effects,...
For as far as I know one 'just' needs to pick a domain he/she likes and start learning/working with that domain. You just can't create a game all b y yourself.
 
hurray for spherical non elastic physic engine in opengl and c++

I R COOL
 
Orion.Instrument said:
I understand C++ (Well any programming language, minus the assembly and machine :P) (I can read and interperet code, but I'm not that great at coding). But, I cannot for the life of me think of where to beging with game programming... Just wondering if someone could tell me? Heh :/

It really depends on what you mean by game programming, if you are doing a mod for an existing engine then that is quite different from writing your own game from scratch.

If you are doing your own game from scratch then I would recomend that you go to microsoft's web site and get the DirectX SDK, loads of examples and docs with that. if you don't have a broadband connection, they will send it to you on a CD, you just pay shipping and handling. Others would recommend OpenGL instead, but it's a matter of personal prefference

In either case, you should brush up on your 3D maths like how matrices are used for transforming, scaling and rotation etc.
 
Sourcerer said:
It really depends on what you mean by game programming, if you are doing a mod for an existing engine then that is quite different from writing your own game from scratch.

If you are doing your own game from scratch then I would recomend that you go to microsoft's web site and get the DirectX SDK, loads of examples and docs with that. if you don't have a broadband connection, they will send it to you on a CD, you just pay shipping and handling. Others would recommend OpenGL instead, but it's a matter of personal prefference

In either case, you should brush up on your 3D maths like how matrices are used for transforming, scaling and rotation etc.
I'd be learning OpenGL if I wanted to create a full engine I think :P
And yeah, my maths are a bit weird...

But, I'm thinking where to start as far as modding half-life 2 :P
 
www.cplusplus.com . Follow introduction, perhaps wait for some HL2 tutorials to come out. just look at the source code, try changing things, see what happens :)
 
Back
Top