Best way to gather C++ game programming experience?

Hey everyone, I have a general question regarding C++ game programming here.

I’m wondering what the community here thinks is a good way to practice/accumulate C++ gaming knowledge. I’d like to learn more about the foundation of C++, the ins and outs of how UE4 uses C++, and have something to judge my progress along the way. Things I have tried so far are making small projects on my own (with different perspectives and styles), looking at UE4 example project source code, and looking at community content. Although I think each gives valuable experience, I’m not sure if I should be focusing more on one over another.

I’ve also looked at modding for UE4 games such as Squad and Conan, but it’s something I’ve never done before and I’m not sure if I would learn much C++ game programming from that.

I’d love to hear what other people using UE4 has to say on this matter. Cheers!

ed: Thank you all for the input :slight_smile: Very valuable

Make a small project
→ realize you have made huge mistakes (will happen!)
→ Start another small project
—> don’t make the same mistakes again
----> realize you have made new mistakes (will happen.)
→ repeat - start another small project without the old mistakes

That’s how it goes. There’s no way you can learn “everything” correctly at once.
If you try to notice and avoid old mistakes, you’ll learn new stuff with each new project you’re starting.

And read / write in this forum, i’ve learned alot through reading other people problems and how people are solving them.

Cheers!

e/ Also, like you’ve said, try to create “new” stuff with each project. Don’t do the same play style / game features all over again, try new stuff.
But keep it small!

I would consider myself “good” in terms of gameplay programming with the UE. But there’s not a single day i’m not learning anything new.

e/ Also, try to write a good / clean and commented code, if your code is readable and understandable, it’s already 50%.

I didn’t look much at other projects, or at examples.
If i don’t know how something works, i’ll try to find a solution for exactly that problem.

I’d recommend learning vanilla C++ first. UE4 C++ has a lot of non-standard conventions and pre-processor decorations that will probalby turn an already steep learning curve into an impossible cliff.

Learn C++, then learn how the UE4 toolchain turns it into more of a managed environment.

Best way to learn is to make lots and lots of mistakes, learn how to fix those mistakes, and iterate for a decade or so.

Start with small, simple projects and scale up as your knowledge grows. Writing command line tools can be a good place to start, as you won’t be tempted by graphics etc, and will be able to focus on the language and the problem to be solved.

Good luck.

I don’t know C++; but I’ve learned UE4’s C++ API.
I think Unreal’s C++ is easier than the pure classic C++ code I see around the internet (for me that is all looking like a mess)… but maybe that’s just me.

Btw, I wouldn’t try to learn the “real” C++ first, that’s going to be frustrating as hell. I’d focus on the Unreal API instead.
Making a game or two entirely on Blueprints to learn the API then translating all that over to C++ code, little by little.

There’s no substitute for lots of practice I’m afraid! Make small games at first and gradually start trying new things, you’ll learn your way around soon enough :slight_smile:

Don’t expect overnight results though, it takes a few months before you can get totally comfortable. Some background knowledge in C++ helps too, I used CPP Insitute when I was first starting out. However, there’s no need to go crazy learning traditional C++ if you don’t need it - Unreal will only throw you off else.

I never learnt regular C++, only Unreal C++

It is always the same thing… practice and talent…

I guess everybody knows the idiom practice make perfect, so I wouldn’t elaborate about it here… And also about the talent, the advantage become too obvious when you are part of the team doing the programming course work, and one guy in the team managed to get it done within hours although the we were given a week or so to complete it.

But UE4 C++ is quite ‘different’ because they play quite a lot with C macro. You also have to know the way around and Unreal API is quite cyptic - template etc, probably this is just me. If you have accumulated a lot of C++ experiences in the past (not in UE4), you may have to unlearn quite a few before you become conversant with Unreal C++ and start making some progress in it.

Definitely don’t spend much time learning C++ outside the scope of UE4, there’s too much stuff and tons of it isn’t relevant. Just google things you don’t understand as you come across them in UE4.

By far the best thing I’d say is to put a breakpoint somewhere in the engine code and just step through the entire game loop. And make sure you’re using a Debug build when doing this, otherwise stepping through the code won’t be very accurate (it’ll skip over code due to compiler optimizations).

Can also use ‘Find In Files’ (ctrl + shift + f) and search the engine for systems you’re interested in. This is also great for determining how to accomplish certain tasks, because there’s usually several examples already implemented elsewhere in the codebase.

I would definitely learn C++ first, coming from Unity I had a hard time understanding C++ code.