Jump to content

Programming / Coding for Source


Quakis

Recommended Posts

I'm willing to go learn as much as a can for modding the Source engine and coding is something else that'd be useful, it's best I start now than never. Just to be sure, what language does it use? C or ...? (I haven't look into it much but I can't get any decent search results for "Source Coding" etc)

Secondly any recommended resources to get started I guess - apps/tools/websites? I'm mainly looking into doing the gameplay side of things just to note. Any help would be apprieciated to push me in the right direction, I'm dedicated to give it a go.

(and don't give me lectures on how hard, etc whatever might be either...)

Link to comment
Share on other sites

Great that you are starting :]

I think the language for coding for source (and most other games) is c++. But if you've already looked at some c, its not that far off :) I actually suggest you start with the small tutorials that skdr posted where you edit some weapons ingame etc... that will definatly get you hooked :)

Link to comment
Share on other sites

Just installing all the needed files right now. Although different, I'd been working with the CON scripting in Duke3d/Eduke32 quite a lot recently and got the hang of it - but should still develop on it for my mods - and enjoy working with it. Math related questions and exams I seem to enjoy working the answers out for compared to those writing papers. Hopefully I can get into this as well, expecting fustrations, but once I get the basics it's really just advancing my knowledge. I just hope I can compile without any problems.

Link to comment
Share on other sites

Couple of tips from someone who's been there, done that...

Source requires C++ and either Visual Studio 2003 or 2005 to compile. I used 2003 with the first codebase and 2005 with the second. Apparently it will work with the free Express editions but it requires some extra work to get your build environment set-up.

HLCoders can be useful but be warned that people can be a bit "elitist" at times. ALWAYS check the archive to see if your questions already been asked before posting (http://www.mail-archive.com/hlcoders@li ... tware.com/) because sometimes you'll get a rather rude response if you ask about something thats come up before. Also be warned that any "noob" type questions will probably get you a reply like "go read a C++ book".

Best advice is when asking a question be as clear as possible about your problem, show proof that you have tried to solve it yourself (and aren't just asking for someone to do it for you) and ask in an intelligent manner. Posts like that generally get the best responses.

Oh and yeah, tutorials. Some of them can be quite out of date as they were posted for the first SDK Codebase and subsequently don't work with the second SDK code release. Be aware of that before you start copy and pasting. To get the most value from a tutorial, don't actually copy it blindly, read it, comprehend what it's doing and try to implement the idea yourself using the example code as a guide. Not only will you get less bugs but a greater sense of achievement if you've adapted the code to your own needs and learned something along the way.

Don't forget the VERC forums which have been closed and moved to steampowered. Theres lots of stuff/discussions there which can be useful.

Old: http://www.chatbear.com/board.plm?b=390

New: http://forums.steampowered.com/forums/f ... .php?f=191

And last of all - the SDK is *BUGGY*. Expect a lot of hair pulling trying to figure out why wierd stuff happens or stuff wont compile.

Good luck!

Link to comment
Share on other sites

HLCoders can be useful but be warned that people can be a bit "elitist" at times. ALWAYS check the archive to see if your questions already been asked before posting (http://www.mail-archive.com/hlcoders@li ... tware.com/) because sometimes you'll get a rather rude response if you ask about something thats come up before. Also be warned that any "noob" type questions will probably get you a reply like "go read a C++ book".

Thought as much about the "elistism" - I'll probably only post when I really need to. Majority of the time I prefer to figure out stuff myself - better understanding and satisfaction of doing so - Again it's like that with Eduke32 CON coding. Right now I'll do what I did to learn the former by reading through tutorials, understand what means what, do practical stuff throughout my understanding - again like I did with the previous (of which I'll still do as well)

Oh and yeah, tutorials. Some of them can be quite out of date as they were posted for the first SDK Codebase and subsequently don't work with the second SDK code release. Be aware of that before you start copy and pasting. To get the most value from a tutorial, don't actually copy it blindly, read it, comprehend what it's doing and try to implement the idea yourself using the example code as a guide. Not only will you get less bugs but a greater sense of achievement if you've adapted the code to your own needs and learned something along the way.

No need to worry about that, it's pretty much what I do when working with Eduke32 CON coding, you won't learn anything without doing it yourself and figuring out problems your having. On another note typing out the lines rather than copying helps get used to writing code out a lot more (well, I already have with CON, just need to get used to C++ now) I've been reading through some tutorials on cprogramming.com about C++ (no experiments yet) and got quite a little bit of knowledge compared to when I first looked at the codes throughout the source files.

Pretty much I've had a bit of experience with coding in another language, so learning another shouldn't be too hard (and the fact it's easier to understand than it did some two years ago when I couldn't understand coding for... hell)

And last of all - the SDK is *BUGGY*. Expect a lot of hair pulling trying to figure out why wierd stuff happens or stuff wont compile.

Cheers, I'll keep that on mind. Thanks for the response. :D

Link to comment
Share on other sites

Good luck. I couldn't get my head around C++. :(

No-one ever believes me when I say this but it's true. I learnt C++ by looking at the source code of HLMV and typing just about every keyword into google to find out what the functions did.

I admit, I had years of previous programming language experience like Visual Basic, Z80 assembler and various C syntax scripting languages before I started but it was still "fun".

Link to comment
Share on other sites

Just to get this out of the way, I have Visual Studio 2003 installed here but any possibilities of running to problems?

Edit;

Here's a good starter for C++:

Teach Yourself C++ in 21 days (a complete lie, but it's still a decent starting point and deals with a lot of C++'s main features). Click.

If I'm not mistaken, if thats a copy of the book from Sams, I have that in book form (third edition) I've been scanning through it recently and might go through it at some point - my dad got it cheap from a carboot atleast two years ago - but I'm finding some stuff on the site I mentioned ealier pretty useful too. Thanks anyway (then again, having it in digital form can be useful)

Link to comment
Share on other sites

×
×
  • Create New...