Anyone can help me point to the right direction in C++ learning?

I want to make a change, and it's been on my mind forever. I want to be able to make small projects in C++ or at least get pointed to a good book for game development. I have been wanting this for awhile and figured I'd make a topic on this matter on one of the games that have been qualified as true fun in all the games I've played (darkest dungeon being another I go to a lot)..

I am eye shopping as we speak, but don't want to waste limited money on a book that will do me no good as a newbie. What do you think is a good book or site that will help a Ascendant such as I?
Last bumped on Sep 17, 2018, 10:31:20 PM
If you're completely new to programming and you're absolutely set on learning C++, then I'd go with Programming: Principles and Practice Using C++, which you can buy from the publisher here: http://www.informit.com/store/programming-principles-and-practice-using-c-plus-plus-9780321992789?ranMID=24808. It's aimed at people who have never written a program, and it's written by Stroustrup himself, the creator of the language. Please note (huge disclaimer): I haven't read this book because I'm not the target audience (I learned C/C++ in college), but I have read his The C++ Programming Language (4th edition) and I like his style of writing and explanation; and because I have seen that "Principles and Practices" book recommended in several reputable places, that's why I'm recommending it to you.

Now, regarding games, there are a few things I want to mention:

1) Please focus on learning the language first. If you're truly new to programming, you need to focus on the basics of the language and then later the principles of procedural programming, object-oriented programming, design patterns, data structures, etc. There are great game development books out there, but they will do you no good until you're able to program.

2) Forget about graphics at first. Make full-featured text games that emphasize creating systems that work. Then feel free to move on to 2D or 3D, which leads to me to ...

3) Use graphics libraries that do the heavy lifting for you. You don't have to recreate the wheel. If you want to learn how to program 2D and 3D graphics from scratch, then you will have to brush up on your linear algebra and calculus/trig/geometry/etc, as graphics programming is very math heavy. I don't know your math background, so if higher math is new to you, then that will be a separate undertaking. (Using libraries also applies to general programming, btw. Sure, you can read up on the Mersenne Twister algorithm for implementing a pseudo-random number generator yourself, or you could employ a math library that already does that for you.)

4) Ultimately, be realistic in what you're trying to create. Lots of people want to get into game programming so they can make the next MMO or AAA console game. Those kinds of endeavors require teams and teams of seasoned people working full time for years. And based on your life situation, a "simple" text RPG from scratch could take you months or years if you're holding down a job, have a family, and do other things for recreation. In case you're able to grab a copy at a library or something, give Game Engine Architecture, 2nd Edition by Jason Gregory a skim. It gives a realistic look at what all goes into making a game, with emphasis on AAA titles.


If all that sounds daunting, don't panic. Start with learning C++ and go from there. Games aside, learning C++ by itself is a hugely rewarding endeavor and can be useful for all sorts of things. You'll then ultimately be compelled to look at other languages like Rust, Go, C#, and the like, as well as scripting languages like Python, Perl, etc.



why do you want to learn c++ -_-
"
3DNeophyte wrote:
If you're completely new to programming and you're absolutely set on learning C++, then I'd go with Programming: Principles and Practice Using C++, which you can buy from the publisher here: http://www.informit.com/store/programming-principles-and-practice-using-c-plus-plus-9780321992789?ranMID=24808. It's aimed at people who have never written a program, and it's written by Stroustrup himself, the creator of the language. Please note (huge disclaimer): I haven't read this book because I'm not the target audience (I learned C/C++ in college), but I have read his The C++ Programming Language (4th edition) and I like his style of writing and explanation; and because I have seen that "Principles and Practices" book recommended in several reputable places, that's why I'm recommending it to you.

Now, regarding games, there are a few things I want to mention:

1) Please focus on learning the language first. If you're truly new to programming, you need to focus on the basics of the language and then later the principles of procedural programming, object-oriented programming, design patterns, data structures, etc. There are great game development books out there, but they will do you no good until you're able to program.

2) Forget about graphics at first. Make full-featured text games that emphasize creating systems that work. Then feel free to move on to 2D or 3D, which leads to me to ...

3) Use graphics libraries that do the heavy lifting for you. You don't have to recreate the wheel. If you want to learn how to program 2D and 3D graphics from scratch, then you will have to brush up on your linear algebra and calculus/trig/geometry/etc, as graphics programming is very math heavy. I don't know your math background, so if higher math is new to you, then that will be a separate undertaking. (Using libraries also applies to general programming, btw. Sure, you can read up on the Mersenne Twister algorithm for implementing a pseudo-random number generator yourself, or you could employ a math library that already does that for you.)

4) Ultimately, be realistic in what you're trying to create. Lots of people want to get into game programming so they can make the next MMO or AAA console game. Those kinds of endeavors require teams and teams of seasoned people working full time for years. And based on your life situation, a "simple" text RPG from scratch could take you months or years if you're holding down a job, have a family, and do other things for recreation. In case you're able to grab a copy at a library or something, give Game Engine Architecture, 2nd Edition by Jason Gregory a skim. It gives a realistic look at what all goes into making a game, with emphasis on AAA titles.


If all that sounds daunting, don't panic. Start with learning C++ and go from there. Games aside, learning C++ by itself is a hugely rewarding endeavor and can be useful for all sorts of things. You'll then ultimately be compelled to look at other languages like Rust, Go, C#, and the like, as well as scripting languages like Python, Perl, etc.





Thank you! I have already bought two books today, (professional C++ and C++ for dummies) but I will get your recommendations as well. It keeps taunting me, every time I look up I keep finding myself in situations where I just want to CREATE, to fumble to to make little snippets work for me, I don't expect to just suddenly be in some top tier job making good money, I could care less if I don't make it...but I WANT it, and as time slips past me I can feel the intense desire to better myself, to reach a stage of being able to play around and look at code and write my own, it's a weird obsession that has triggered in me after traumatic life events.

"
why do you want to learn c++ -_-



I will be honest, it was said that this is the one to get a better gr apse of all other languages, and it feels cozy looking at it as a shit faced newbie who can't save herself in God came and handed me a opportunity to better oneself.

Simply put, I want to learn it because the info is there to learn if I apply myself, there is no endgame goal here, I simply want to be able to understand and write my own code or at least dabble with it when I'm not at my dead end job. There was a massive termination wave at my job but I was spared because of how well I work...but on my birthday I realized I have no real knowledge except for running a machine that many couldn't do...sure, it's unique, but I want more...I want to be able to create little projects that others can enjoy...or scuff off... but I also want to learn more than one language if I can tap into the "hardest", it's a self motivational hell bent sensation that must be satiated by my curiosity and now is the time more than ever to apply myself with so much time instead of dedicating myself to a job that is dying soon.
honestly instead of suffering myself learning c++ i would enjoy my time playing you know
"
Pilla wrote:

I will be honest, it was said that this is the one to get a better grasp of all other languages, and it feels cozy looking at it as a shit faced newbie ...


C and C++ are closer to the OS/hardware than a lot of popular languages, so you're going to run into people who will argue that a higher-level language (or even a scripting language like Python) would be better to start with. (And they certainly have an argument there). But if the syntax of C++ tickles your fancy, then go for it. I'm the same way; opening an old MUD and scrolling through reams of C code puts a smile on my face.
Javascript is BETTER...! FACT
"
IMSilver wrote:
Javascript is BETTER...! FACT

Wat
Doing C++ is really, really hard. I would say most professional "experienced" programmers don't even get it right. That's because C++ is a hybrid monster of C and OOP. It's relatively challenging to find the right balance between "let's write low level assembly!!!" and "let's abstract everything into interfaces and services".

If you're a beginner, start with C. Get really, really good at C. Then when you're comfortable with C, start leaning a more 'modern' language like C#. Then, when you're comfortable with that, come back to C++, and like...try to cram the best of both of them into C++. Also, learn boost/stl. And while you're at it, try to find a tutor. I'm honestly convinced that becoming good enough at C++ to game development in it requires somebody actually pointing out when you make design flaws.

I'm not saying C++ is impossible. What I'm saying is it's really easy to write spaghetti in C++. You have so many tools at your disposal and you need to know when to bring out the bazooka and when to use the scalpel. When to roll your own pizza dough and when to use the store-bought crap. And there are so many patterns and anti-patterns you need to be aware of...plus you need to be generally knowledgable in low-level OS-based stuff, not just in Windows, but in Linux/Unix too, because chances are the code you're writing has to operate in both spaces.

And when you think you're done with C++? Well, now it's time to learn CUDA or the equivalent, and write shaders.

Don't let yourself be discouraged. You've got to take it on step at a time. But doing C++ well I think makes you a...fucking ninja. Whereas something more pedestrian like Java, Javascript, Python, etc. makes you...uh...just a regular chef. Or something. I don't know where I'm going with that analogy. C++ is basically an amalgam of "you can do everything" and the response to that over the last 20 years has been "yeah, sure that's great, but..."

In the meanwhile, you can learn a lot if you just go digging in Unreal Engine's source code, or the equivalent library. Start tinkering there. I learned a lot making my first game in SDL, too, that's also a good place to start.

Buying a book in my opinion is a waste of your money. Unless you're one of the rare sorts who actually reads books and follows their lessons. For the price of one or two novels a month, you can just sub to Pluralsight, which has a full battery of programming courses. They're generally pretty good especially if you're at a beginner/intermediate level.
My Keystone Ideas: http://www.pathofexile.com/forum/view-thread/744282
Last edited by anubite on Sep 16, 2018, 10:30:53 PM
"
Mark_GGG wrote:
"
IMSilver wrote:
Javascript is BETTER...! FACT

Wat


Mark, you shouldn't make fun of JS, some people might be offended by that. Somehow there still are people who use JS. ;)

Report Forum Post

Report Account:

Report Type

Additional Info