Want to be a coder, or try it...

Mutley

Tank
Joined
Sep 7, 2004
Messages
2,696
Reaction score
0
I have never done coding before (except website creation PHP style) but I want to learn the basics and wonder if anyone can give me some tips/tutorials of where to begin and which language you advise, such as C++?

Remember I am a complete n00b at this so don't expect me to know what all the terms are. Everyone has to start somewhere...

Thanks.
 
I started somewhere to... I started of by buying the book "C++ for dummies"
 
C++. If you want anything to do with mods, learn C++.

-Angry Lawyer
 
get sam's teach yourself c++ in x amount of hours.

does wonders, read it first until you are at utter confusion, then on your second read of the book, work along with it, you will start to pick up the basics, then from there, just like all programming, its 90% trial and error, 10% syntax and libraries.
 
r u talking about cheating on games? also i am new.
 
combinedeath13 said:
r u talking about cheating on games? also i am new.

ermm... no, c++ is the language that the Mod SDK is programmed in, as well as the game its self (including engine).

He wants to learn to program, so we are recommending items for him to read and do.
 
C++ is both good and bad here. The bad thing is that it's a pretty difficult language, with certain complications, and it's not an easy language to get started with. The good thing is that if you know C++ you can really call yourself a programmer, and you will pick up most other languages very quickly, and even be able to read code in some other languages right away.

Another thing, of course, is that Half-Life 2 and mods are done in C++.

However, if you want to learn C++, you have to be serious about it. Buy a book for begginers, look up some basics/tutorials on the Net, read it, think about what you read, work along with the examples, go back to reread things you don't understand, etc. Programming is not for everyone and may be hard to begin with, but if you do enjoy it, the enjoyment will be great.

Oh, and remember that programming is a bit like maths, I mean, if you don't understand some concept, you will not be able to understand more advanced concepts based on it. So you've got to make sure you do understand at least the basics concepts.
 
C++ primer plus is a great book to have when starting up in C++. I wouldn't recomend those teach yourself blah blah blah in x hours because they don't go into depth on how things actually work and why they are used. Those books are primarily for people that already know a programming language but want to learn another one and need a quick book to go through about using the new syntax.

Another book you should get is Thinking in C++.
 
C++ is what mods are coded in? I would be interested to learn as well then. Modding Half-Life 2 will probably be a good start to my future goal of becoming a programmer. :)
 
Not all games are in C++, HL2 just happens to be one of them. Some games have their own scitpting language for modders (like the unreal series)

Hl2 modding is a good start but after you know how to program. You can't just dive in and start making stuff and actually know what you're doing. Infact it's a BAD way to start programming. Anyone can copy and paste code to make a new weapon and edit a few values that are obviously numerical values, but you still won't know what the hell you did, how it affects the other lines of code you just copied debug your code that is even if you can read it.

Take the time and learn C++ first. The "basics" would include variables, control statements (if, else statments and switches), operators, arrays, structures, pointers, loops, functions(with returns, arguments and overloading) classes and then inheritance. I'm not saying you have to master these, but atleast be able to code small programs from scratch using these basics and understand their functionality Now you should be able to start looking at HL2 code and have the ability to understand what is going on and how it is all related.
 
From my experience, it doesnt seem to matter as long as you get the golden rules of coding down...

variables, loops, classes, inheritance, recursion etc... they all seem to show up in one form or another in most modern programming languages, then again I coded my mod largely on the codebase provided... so I'm not asqualified to answer that question as other coders on this forum
 
Things you absolutely must be comfortable with include variables, loops, control-flow statements, nested statements, basic calculations, outputting information to screen and understanding what classes are. From there, you can probably read code pretty well.

However, indeed, starting with something as big as modding HL2 is pretty complex, as you likely won't understand much. It's better to learn the language while writing simple examples - a program that takes the input of some numbers and computes their average value, a program that performs simple geometric calculations, that writes text to a file, etc. That will give you a decent understanding of the language.

As far as books go, I have to mention "The C++ Programming Language" by Bjarne Stroustrup. Bjarne Stroustrup is the man who created C++, the book is quite in-depth, but it's possibly the best book for a description of the language itself.

I am not a big fan of the "C++ for dummies" or similar books. I find that they often concentrate too much on advancing the reader fast, but don't give the proper understanding of the concepts.

The tutorials on http://www.cpp-home.com are pretty decent, but many of them cover more advanced topics that the basics.

The main thing is... don't be afraid to ask questions. There are many huge forums for coders, including forums for newbie coders, and for starters, you can ask your questions here, as this forum also has a number of people that know C++.
 
Solver said:
Things you absolutely must be comfortable with include variables, loops, control-flow statements, nested statements, basic calculations, outputting information to screen and understanding what classes are. From there, you can probably read code pretty well.

You forgot pointers. If you don't know what pointers are, you won't get anywhere with the SDK. Every other line in the SDK basically involves the use of a pointer.

And the Combine weren't on Xen :p

-Angry Lawyer
 
Yes, my mistake, of course. I merely forgot them because they are (for some reason) usually not in the basics section of programming books, but pointers are absolutely required for understanding and writing complex programs.

And the Combine were on Xen :p.
 
Solver said:
Yes, my mistake, of course. I merely forgot them because they are (for some reason) usually not in the basics section of programming books, but pointers are absolutely required for understanding and writing complex programs.

Especially with Source. EVERYTHING is a pointer to something in the Entity List.

Solver said:
And the Combine were on Xen :p.

Lies, Laidlaw confirmed my side of the argument.

-Angry Lawyer
 
Angry Lawyer said:
Lies, Laidlaw confirmed my side of the argument.

And I am not going to forgive you for that :p.

On topic, there's one link I like, it's not C++, it uses the Python programming language, but it is useful to anyone learning programming in general, as it does in many places focus on thinking about programming instead of the actual code implementations.

http://www.ibiblio.org/obp/thinkCSpy/
 
*Figures that Angry Lawyer hates VB*

There are, in fact, languages that use only pointers and no regular variables. In Python, for instance, all variables are actually pointers.
 
Solver said:
*Figures that Angry Lawyer hates VB*

Correctamundo. I hate the fact that it's not strong-typed either (as far as I remember).

Although, I'm going to have to relearn VB sometime soon, because my workplace codes in it, and I'll need to learn it if I'm going to get that promotion. Damnit.

-Angry Lawyer
 
No, VB is not strong typed. You can assign a string variable to equal any numerical variable and it will work without anything like casts or conversion functions.

Interestingly, while you're supposed to write:

Dim a As Integer
Dim b As String
a = 200
b = Str(a)

most programmers will simply tend to write:

Dim a As Integer
Dim b As String
a = 200
b = a

for essentially the same result.

My biggest complaint with VB, though, is that you can use variables without declaring them. You can prevent that by typing the right directive in your module, but it's possible to program without declaring. That can be a disaster if that is how someone learns to program.
 
I HATE VB.

Java isn't bad, its not as powerfull as C++, but its really usefull for internet stuff.
 
Java is quite powerful indeed... but it's slow. Especially if you need to access some low-level features, which you can do (but are not supposed to in Java natively), that can sometimes slow you down beyond the acceptable level.
 
.Net

Being able to work in multi-language environments has become so crucial to the way that i work. c++ math processing dll's with C# code library dlls', all the way to the vb gui. Why do i work in so many languages? each has an advantage.

c++ is fast
c#.Net has a lot of coders available
vb.Net is quick development


Before you all start bashing on .Net, i make 6 figures a year programming in it, so no matter what you say, flame, or complain about, i am still very happy with it :p
 
Whats a decent book for learning c++, what about c++ for dummies?

Ive already learnt some basics on the internet, but Id prefer to learn in book format.
 
solaris152000 said:
Whats a decent book for learning c++, what about c++ for dummies?

Ive already learnt some basics on the internet, but Id prefer to learn in book format.

i got "c++ in 24 hours" sams publishing i learned a lot about the syntax and the basics so far but im not even half done yet.
 
Zeus said:
i got "c++ in 24 hours" sams publishing i learned a lot about the syntax and the basics so far but im not even half done yet.


agree with sams as i stated in an earlier post, this was the framework that got me started programming oh so many years ago.
 
Isn't it possible in vb .net to turn on explicit and strict and so force the use of Cint() etc? I'm sure the last time i coded in said language it was the case, could be wrong though :)
 
agree with sams as i stated in an earlier post, this was the framework that got me started programming oh so many years ago.

cool i have a sams teach yourself c++ in 21 days book as im am just beggining to start learning c++, i ordered visual studio 2003 yesterday. it will probaly take me more like 80 days to read it as its 1000 pages long.
 
Back
Top