C++ RPG books and tutorials

Started by
5 comments, last by Buster2000 8 years ago

I'm sure this topic has been asked to death.

I am looking for some good startup material for an RPG written in C++, preferably using SDL/OpenGL and 2D sprites. I'd love to know what books or even videos you guys would recommend for things like Game States (for random battles, etc), changing sprites for animations, and just building simple games, etc.

Thanks!

Advertisement

I would steer away from "Book designed for narrowly specific category X".

If you want to learn programming, you ought to learn C++, SDL, OpenGL, and game architectures in general.

The reason for this is because even though books like "Learn to make RPG games using SDL, OpenGL, and C++" actually exist, they tend to spend part of the book teaching C++ poorly (or glossing over it), part of the book teaching SDL poorly (or glossing over it), part of the book teaching OpenGL poorly (or glossing over it), part of the book teaching game architecture poorly (or glossing over it), dump a bunch of source code on your lap, and pretend that everything is obvious and "Now you know how to make games!!!!! Go make your own!!!!", leaving you with a $60 paperweight that you might've learned two or three good things from, a dozen things you could've learned online for free, and two dozen bad poisonous practices that you'll spend years not realizing have harmed you more than they helped. </opinion>

Buying a book on modern C++ is great (if written 2012 or later - almost everything before that is either outdated, or not beginner material anyway). Buying a book on game architecture is great because programming practices and general knowledge can be useful even a decade or two later. Buying a book on OpenGL or SDL or any specific API is bad, because whatever book you get is likely outdated before you even read it. For APIs like SDL and OpenGL, I suggest just using online resources.

In general, APIs change every year or so, languages change every six or seven years or so, and general programming practices change every decade or two. Leastwise, that's my experience in my tiny corner of this vast programming forest I've intentionally gotten lost wandering in.

For the things that change infrequently, a book or two can benefit greatly, coupled with online reading, googling questions, and then forum questioning.

For things that change frequently, skip the (almost always outdated, very often poorly done) books, go strait to online resources/tutorials, googling questions, and then forum questioning.

Yes, you can get some benefit from API-specific books, and some benefit from "Learn to make RPG games using SDL, OpenGL, and C++"-style books, but you can just as easily get that information online, for free, often written by the authors of those APIs, and directly ask questions tailored directly to your information-gaps when still confused.

Another general spot of advice: Don't pay for online videos or online tutorials also. While a few might be good, it seems like most are junk, and you can almost always get the same information through tutorials, articles, and googling and asking questions.

Hopefully that helps. Welcome to the community, btw! :)

pretty much any book using SDL is going to use the SDL 1.x interface, which is quite different than the newer SDL 2.0 interface you should probably be using.
If you want to learn how to program with SDL, I strongly recommend Lazyfoo's tutorials: http://lazyfoo.net/tutorials/SDL/index.php
If you want to learn how to program in C++, I strongly recommend just writing programs in C++. Most books on C++ are outdated and many books on C++ gloss over important parts of the language. Use free tutorials to increase your knowledge, at least then you're not paying for bad or outdated information. When you do need highly specific information, ask here or on other programming sites - programmers who know the answer will gladly answer your question.
I'm owner of about 50 different programming books, most of which were bought prior to 2011. Not even the ones on programming Android games are relevant any more. They look nice on my book shelf though.

pretty much any book using SDL is going to use the SDL 1.x interface, which is quite different than the newer SDL 2.0 interface you should probably be using.
If you want to learn how to program with SDL, I strongly recommend Lazyfoo's tutorials: http://lazyfoo.net/tutorials/SDL/index.php
If you want to learn how to program in C++, I strongly recommend just writing programs in C++. Most books on C++ are outdated and many books on C++ gloss over important parts of the language. Use free tutorials to increase your knowledge, at least then you're not paying for bad or outdated information. When you do need highly specific information, ask here or on other programming sites - programmers who know the answer will gladly answer your question.
I'm owner of about 50 different programming books, most of which were bought prior to 2011. Not even the ones on programming Android games are relevant any more. They look nice on my book shelf though.

Adding onto this

There is absolutely no translation between beginner and advanced programming in C++. Most of the books that directly say C++ will be introducing you to the most basics of concepts. Assume that you've had experience and intermediate programming experience. Or assumes you are looking for advanced concepts with very little implementation written in front of you.

Right after learning the Syntax, it's learning data structures, algorithms, paradigms, and models. These are the driving forces behind 100% of the code base. Even as you program now, you're using some sort of paradigm that will eventually be combined with something else.

When you first start programming in C++ based off of the learner's hello world or other basic level tutorials. It's the procedural paradigm, where the order of execution is defined and definite.

As you start getting more advanced, you start branching into the indeterministic order of execution involved with Object Oriented Programming. The execution path can dynamically change at runtime based on the logic of the code. So you start conforming to the logic of the system, or your data. Most tutorials will -not- cover this. This is something you typically learn with time. In formal classes. Or on the job (May god help you if you're in that situation.)

You guys are amazing, thank you for the lengthy replies!

I'll take a look at Lazyfoo's SDL stuff as a starting place. I see on his site he has some OpenGL tutorials as well.

It seems to be recurring advice from the three of you not to pay for tutorials, and I can understand why at the rate things become outdated.

I feel I have a pretty good grasp on( the basics of) C++ now, I'll start reading about game architectures and learning SDL here from and I'll pick up the pieces as I go.

Thanks again!


It seems to be recurring advice from the three of you not to pay for tutorials, and I can understand why at the rate things become outdated.

It may arise that there are no good quality free tutorials on some new subject, but someone has written a book about it. If you're in a hurry to get new knowledge, it might be smarter to buy a book on the subject in that case. But that's a pretty rare situation.


It seems to be recurring advice from the three of you not to pay for tutorials, and I can understand why at the rate things become outdated.

It may arise that there are no good quality free tutorials on some new subject, but someone has written a book about it. If you're in a hurry to get new knowledge, it might be smarter to buy a book on the subject in that case. But that's a pretty rare situation.

This is true. Something like SDL is fairly old hat in terms of technology so theres tons of info. On the other hand if you need info on something like Blockchain 3.0 then there isn't really much information out there so your best bet is paying for a book.

This topic is closed to new replies.

Advertisement