In a bit of an academic pickle here...

I need to pick up C++ to fulfill one of my dreams: to write the game I've been designing for 5 years now... I think it's going to be a great game and anyway, I want to do a professional job :)

While looking at the best books to get started, I found C++ Primer (S. B. Lippman) but saw that it is only up to C++11...

I figure, if I am going to learn C++, I might as well get started on C++20, right?

* Should I buy this book and then buy the 6'th ed (expected Oct2021) and refresh?

* Or, should I buy a more up-to-date book. My requirements:
- Goes through major C++ topics
- Provides insight on algorithms, design patterns and generally efficient code that runs great and is easy to contain in the super-code that manages it
- Provides thought-provoking (shall I say "Difficult"?) questions AND answers
- Teaches C++ as "C++", not "C-with-extras"
- Fundamentally concerned with C++20, or at least explains the updates to the standard in a structured way
- Isn't too cheesy. I am not a child, I don't need comics every 5 pages
Last edited on
I would be a bit careful aboiut C++20.
Though it's the new standard it's not fully supported by the compilers.
One book I like is "Professional C++" by Marc Gregoire 4th ed. It covers C++17.
C++20 is cool and all, and has some interesting features, but I doubt there are many well-vetted books that cover it well yet, and to be frank, you don't need most of it, especially as a beginner. I assume the upcoming edition of the book would cover more of the latest features, but again I'm not convinced it's necessary for you.

The question which isn't clear from your post, is: Are you new to programming in its entirety, or are you just new to C++?

As a beginner to programming, you will need to practice a lot, and there is plenty to learn before learning the latest C++20 features. According to https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list the book you mentioned is good for people with no prior programming experience.
I wanted to say something about my programming level and then I didn't want to :D

I am professionally employed as a software engineer since 2008. I have a degree in electronics.
I've written software for Prolog, COBOL, Java, Python and embedded-C, among various scripting languages.

That being said, I always feel like I know nothing! I always feel like I could have written something better, had I known how to... I've seen stuff inside the Oracle-JVM I could do a lot better... And I've seen a kid's homework that I feel I could have not written as well, myself.

In other words, I can get stuff done but any chance I get to work on my fundamentals, I will take!
You should use a game engine.
https://en.wikipedia.org/wiki/List_of_game_engines

(BTW, surely it's just "academic".)
For a C++ intro to intermediate level book, I'd suggest Beginning C++20: From Novice to Professional by Ivor Horton.
if I am going to learn C++, I might as well get started on C++20, right?

The basics of C++ predate C++20. The C++20 standard made additions, changes and fixes to the language.

I am not saying ignore what C++20 has to offer, but the bulk of the language isn't C++20.

A decent online resource for learning C++ with little to no previous programming experience is https://www.learncpp.com/

Learn the basics first, then leveraging that knowledge to create a game will be easier.

A game with images and sound/music will require 3rd party libraries to create, the C++ standard doesn't deal with that. "Pure" C++ can create a text-based game like the original Zork or early Ultima games.
+1 to dutch, use an engine. Unreal supports C++ and since it's last license update it super friendly to hobbyists. I can't remember why I chose Unreal over Unity, but there was a good reason...

Edit: Another reason to choose an established engine as opposed to a home brew solution is that it gives you stuff like this: https://kitbash3d.com/collections/kits . This is a professional studio, but even the free amatuer stuff makes it a no brainer. You'd be crippling yourself in addition to wasting years home brewing an engine.
Last edited on
"wasting" is a subjective term :)

I've been told before not to reinvent the wheel, then the wheel given to me is a cracked square marble stone with an off-center hole... I spend a week trying to work with it, it sucks.
Then, I take a few days off (so nobody can complain), write my own supporting classes, which are prefect for what we need (by design), I know exactly how they work and I will defend any choice taken, from variable naming to build configuration...
They need something changed? They don't need to beg to some open source guy to consider their use case, they got the leading expert on their tool on payroll already...

Granted, I know the field of 3D rendering is highly specialized and I may never come close to making something useful on my own.

Anyway, the game is essentially 2D, with 3D only for visually handling the topology and texture of the on-screen objects.

We'll see what I manage, when I get there!
First, I must become proficient with the underlying language.

I bought the C++11 Primer book. With all my other work-required studying, I should finish around when the same books comes in C++20 edition. I will rehash then with the new book. I was going to rehash anyway.

Thanks for all your contributions. I always appreciate when someone spends some time to try and help me!
I hope in several months to be able to help out in the forum, as well.
Last edited on
Okay so you aren't new to programming in general, that's good. The fact that you've even looked inside the JVM at all probably sets you apart from a lot of others. But have you made other, perhaps smaller games before this one that you're currently designing? And how large is the one you're currently designing?
Last edited on
Short answers: 0 games made so far, small-to-medium size project planned
...
A crazy fact is that my first job was in Ubisoft Sofia, as a game designer, circa 2006 :)
(they got me for my English and the fact I know the difference between game design, graphic design and story)

It's going to be a take on space dogfighting, with <4 player co-op and PvP.
I am getting an artist to do some mock visuals next week!

I'd say it's not going to be that big of a project, the resources are going to be relatively few.
I would probably take a long-term iterative approach, start with something really basic, single-player, even totally different mechanics than my goal, just to get thinking outside of a back-end-programming sphere
Last edited on
Anyway, the game is essentially 2D


OK, if we needed anymore proof that you haven't started yet. FWIW, it's actually easier to make a 3D game these days and just lock the camera compared to drawing out 2D sprites and screwing around with hitboxes. This is because every 3D rendering engine in extant existence has a collection of wireframe primitives that basically do the job for you then you just have to wrap skin on them.

Don't get me wrong, I still would love to see what you come up with either way. But is your dream to make a game, or to make a game engine?
Well I think OP has a reasonable chance of success. More reasonable than average, certainly, because:
I am professionally employed as a software engineer since 2008.

As many of us have probably learned first-hand, any attempt to write an library first results in huge amounts of wasted effort inventing problems and overgeneralizing. A better course of action is to solve the problems at hand, then to write a library (if needed) by extracting repeated code.

We see the former from newbies who decide "I want to write a game engine" and then invariably fail because they solve problems without any application.

Since OP has control over scope, writing a game should be fairly a fairly approachable task, even without library support.

While looking at the best books to get started

Because you are an experienced programmer, try
A Tour of C++, 2nd ed. Addison-Wesley. ISBN 978-0-13-499783-4. July 2018.
https://www.stroustrup.com/tour2.html
Stroustrup is the language's original designer.
Last edited on
Topic archived. No new replies allowed.