Another CPP thread

Hey duders and dudettes, I’m in a mod team currently without a programmer. We need one and can’t find one… so I figure I better step up to the plate and learn myself ( currently the Character artist… and probably lead animator ). I know a fair few of you here are pros and wanted to ask.

What’s the best way to learn? Are there any good sites out there with really easy to follow tutorials? I’m using a thing called “Dev-CPP” for my compiler… I hope that will do the job.

( oh, and if it’s important the mod is for Half Life2… of course. )

Programming isn’t that easy…

… no kidding, but I want to learn.

( ps, If I can learn how to copy Qbasic out of a book when I was 8 and on to my C64 then I’m sure I can learn this shit too )

Good attitude, and it is doable.

I have no idea how much programming a mod team needs, or in what speciality areas, but a good basic “teach yourself C++” type book is the first step. Step 2 is to read it, then read it again while doing the exercises. Step 3 is to get a book on whatever specific programming subtopics you will need to master for your mod (DirectX?, AI?) and read those and do the exercises. Step 4 is to start programming, realizing that step 2 and 3 haven’t really prepared you and you will be referencing your books frequently.

You can’t learn to swim without jumping in the pool, so having a nice concrete project to dive in on is actually a good learning tool as long as you don’t expect to get it right the first time.

I’ve been using a combination of the Sams “teach yourself in 24 hours” series and internet tutorials.

The Sams book from a noobie point of view does seem to be pretty good at covering the basics, though the IDE it provided didn’t seem to like XP too much. Borland used to do a freeware C++ compiler and theres DJGPP (I think) floating around somewhere that will at least let you play with the “hello world” stuff.

I did find a half completed tutorial floating around somewhere using an RPG/D&D style game as an illustration of how various elements within C++ can be utilised which worked very well for allowing me to get my head round some of the concepts involved.

Microsoft has Visual Studio Express 2005 in beta, and while in beta, it’s free. Apparently the beta is quite stable.

Does the compiler make alot of difference to the end result ?

Yes, the downloads have just been updated to beta 2 which includes a “go live” license (i.e. you can publish the stuff you write with it). The full product will be only $49, too.

Downside: The “Express” packages are language-specific, so if you get the C++ version you get only C++, not the full Visual Studio. No plug-ins, either. But for the price…

Having the right compiler can make life a lot easier, especially when trying to compile and test example code from a book or from the 'net. Most example code is generated and tested using Visual Studio, sometimes GCC. Using a more obscure compiler can mean that you’ll get all kinds of odd compiler errors that you’ll have to resolve yourself, with less on-line resources to help you.

For x86 development, you can’t beat Visual Studio for ease of use and online documentation support, and this is coming from a guy who works for a programming tools company. We don’t even bother marketing to Windows-hosted x86 programmers.

You might want to avoid the GCC, because the GCC compilers contain a lot of non-ANSI-standard programming language extensions that if you get in the habit of using, you’ll find difficult to stop using.

Yeh, ok … what did that last paragraph say?

Visual Studio is the standard for windows, and is a good product. Don’t use GCC because a lot of folks rely on features that are in it that aren’t, technically, legal language features, and that’s a bad habit to fall into when you’re starting out, because you won’t recognize that they’re not standard features.