Where do I start?

I’m learning c++ and have been watching the c++ tutorials and reading information. Most of the tutorials don’t make sense to me. I can’t even find out how to print text to the console. Are there any detailed beginner c++ tutorials?

Hi Someperson,

C++ is a very advanced computer language. It is considered low level due to it’s complexity and therefor not the kind of language you could just jump into. That being said… if you are 100% convinced that you want to learn C++ you could possibly start with some of the community beginner tutorials like the https://www.youtube.com/watch?v=REQlhaQSX6A&list=PLZlv_N0_O1gbaxvlmNY_CfjLsn3FqfPXb&index=97

I would suggest you rather try your hand at the Blueprints as it would be a tad easier to get into.

If you have experience with Java or C# then you should be able to migrate to C++ with relative ease by reading some migration tutorials on google.

If you have zero object orientated programming experience then i would go as far as to say that you are in way over your head sadly:)

If you have other questions I will try answer them.

Cheers

Have you watched and followed all the videos from the Introduction to C++ programming series , from unreal engine youtube channel? That is really simple and straightforward.

Hey if you are motivated enofe you can learn C++.
But its going to take you year(s) to get efficent in it.
Its totoly doable to learn but you must prepare for hard times, its not just something you pick up over the weekend.

With that sad there are some great resources on the web for you.
I whould say start with some video tutorials, i can recomend.
**Note: **Videos is for entry level, you will need some books ether way.
C++ Tutorial - Absolute n00b Spoonfeed
Buckys C++ Programming Tutorials

After that i recomend picking up some books on the same subject i can recomend.
C++ For Dummies
C++ Primer (5th Edition)

Intermidiate Level Books:
Object-Oriented Programming in C++ (4th Edition)

Also there are some resources/ sites you should know about.
http://www.cplusplus.com/

Also there are forums as well related to the video tutorials that are dedicated to helping C++ beginners.
Am sure you be a pro in no time.

And don`t listen to the nai sayer, if you want to learn it you can learn it. :slight_smile:

I was watching episode 3 of the unreal engine tutorials and the person doesn’t explain the code. She just puts the code in. I can’t even print text to the console on unreal engine 4. I’m reading a book on c++. I’m a beginner at c++ but, I can still do way more than I can do in unreal engine 4. I can’t do anything in unreal engine 4 yet in c++. Can anyone explain how to print text to the console in great detail? PS Thanks for the replies so far.

There’s a good “Hello world” tutorial : Unreal Engine CPP Quick Start | Unreal Engine 5.1 Documentation

One tip though… you need to add #include “Engine.h” to the top of your HelloWorldPrinter.cpp to use the GEngine object.

Edit: And 's some other ways to print text… A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I already knew C++ when I came to Unreal, but “Unreal C++” is an interesting dialect. I guess it’s not technically a dialect, but it has such an extensive build system and set of Macros, that there’s a whole nother layer on top of C++ you need to learn.

Honestly, the thing that has helped me the most has been taking apart the code in the C++ project templates and the Shooter Game content example. The Shooter Game is a little outdated, but an awful lot of the basic tasks you might need to accomplish are done somewhere in that project, so dissecting it can yield a LOT of insight into The Unreal Way™.

If you want to print text to the screen/ console output you can use two methods out of the box.


PlayerController->ClientMessage(..);
GEngine->AddOnScreenDebugMessage(..);

As for getting started in UE 4 programming.
I whould say learn Blueprints first they are simpler and faster to experiment with.
When you know some stuff try to do it in code.

Entry Level Guide to UE4 C++
First Person Shooter C++ Tutorial
Introduction to UE4 Programming Playlist

Hi Someperson,

This tute is the one that helped me start to feel like I understood what was going on in an unreal game:

First Person Shooter C++ Tutorial is outdated if you are using 4.6 so avoid that until its updated or you know how to update the code yourself.

just jump right in and start messing with it, try some tutorials linked in this thread.
also have a go at blueprints, there are loads more tutorials for them and it will get you used to how things work, and you can right click on the nodes and see their code (if you have the source)
having an engine built from the source helps a ton because you can trace something back all the way and see whats really going on and how things are put together.
shooter game is also a great way of finding out how things can be done.

dont be afraid, the more you try the clearer it becomes.

I recommend you make and use Blueprints, go to C++ when there is a very specific situation where Blueprints will not give you what you need.

UE4 is not the place to learn C++ just because. If you just want to learn C++ stay away from UE4 do stuff in the console then add in some graphics library like SDL for 2D stuff at first, then dive into OpenGL or DirectX for 3D graphics in C++. On the other hand if you want to make a game in UE4 and need something that Blueprints aren’t providing, getting that specific situation solved with the help of tutorials and the community on the forums is doable. You need a reason beyond learning, it’s not the best place to learn it.

Hi Someperson,

Blueprint is a good place to start!
I was a blueprinter in the team. I started in unreal by learning blueprint and getting familiar with the common-used functions for about three month.

Then I found some of the functions are too complicated when just “doing drawing and connection”, so I tried to write them in C++ and make them “BlueprintCallable”.
I had no C++ programming experience(was a python amateur) and just started learning how to use C++ in unreal a few weeks ago.
And I am reading C++ primer and also learned some knowledge from my C++ programmer friends. This community is also a very great place to learn. I will check the threads and update some info every morning for 30 minutes before I start my work ^_^.

I am not a well-experienced programmer,just want to share something with you.Hope this could give you some clue.

Have fun learning!

I agree with this. Being new to the engine, and game programming I’ve felt it to be very helpful to get started with blueprints. There seem to be many more tutorials with them also. Now that I have much of the functionality I am looking for in blueprints and learned a little about the engine, I can use them as nice flow charts to implement in C++. Its still a pretty rough road for those like myself who are just starting out with C++ (i have the benefit of other programming experience though) but at least now there is a little foundation to build on.

Thanks for all the replies. A lot of people are saying I should start with blueprints. I’m not sure if I should. I would really prefer coding in c++, but it seems so complicated. Should I read more on c++ then come back and try it? Or start with blueprints? Ultimately I want to code in c++.

@, start with blueprints. you can always add C++ to your project later. It is a simple matter to rebase your blueprint to a C++ class. It’s less about knowing C++ and more about knowing the Unreal API.

SomePerson, hi!

First of all, repeat this 10 times every morning. C++ in NOT magic. If some other schmuck has done it, so can you :). All it takes is perseverance. How about this quote from Calvin Coolidge?
“Nothing in this world can take the place of persistence. Talent will not: nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not: the world is full of educated derelicts. Persistence and determination alone are omnipotent.”

Having said that, from a practical point of view, I would suggest the following:

Consider your effort as a three pronged attack:
1
General C++ competence
2* Knowledge about 3D graphics programming
3* Unreal programming.

Let me elaborate a bit:
1
General C++ competence : This is just getting your syntax, data structures and algorithms part right in C++.
Recommended sources :
www.gameinstitute.com (Disclaimer! I am not associated with this institute. Just took a few courses.)
Books by Stephen Prata (C++ Primer)
Numerous YouTube based basic C++ tuts.
You should be very comfortable with pointer operations, string manipulations, operator overloading, templates, macros and pointers to functions at this stage.

2* Knowledge about 3D graphics programming
Recommended sources :
www.gameinstitute.com (Disclaimer! I am not associated with this institute. Just took a few courses.)
You should be well versed with vertex buffers, index buffers, the programmable pipeline (nobody uses fixed function pipeline these days), basic lighting algorithms, binary space partitioning, object culling, world, view and projection transformations at this stage.

*The excellent book by Mr. “Game Coding Complete, 4th Ed”. I refer to this book constantly:
http://www.amazon.com/Game-Coding-Co...e+architecture

*For a gentle intro to 3D rendering, try Frank Luna’s book “Introduction to 3D Game Programming with DirectX 11”
http://www.amazon.com/Introduction-3...rds=frank+luna
Luna has a website for the code examples. Be sure to compile, run and dissect the code. Needs a Visual Studio 2010 environment though.

3* Unreal programming.
*UE4 code uses a lot of patterns. Singletons, component patterns etc. The following is great resource:
http://gameprogrammingpatterns.com/contents.html

*The UE4 programming tutorials (official and user created) on YouTube etc.

My humble opinion is that without this structured approach, jumping directly into UE4 C++ code will only result in frustration.

Good Luck.