Is it worth beginning C++ or stick to Blueprints?

Always great to see another on here.

I think learning any skill is always worth it (especially in computer science), but you aren’t limited to either a C++ or BP project. You can mix and match the two as much as you feel comfortable with. Many of the indie horror games and such made with UE4 are BP only from what I’ve seen. Plus you can always prototype something in blueprints and then try your hand at moving that logic into C++ later (that’s actually a great way to learn the internal UE4 architecture).

So, the long and short of things is do things however feels most comfortable to you according to your goals: If you want to just make a fun game prototype and aren’t strong with C++ - stick with BPs. If you want to brush up on your C++ and feel like making a game is a fun way to do that - go with C++.

I would just advise that whatever route you go, make your project a C++ project rather than a BP project. A C++ project can still be 99% BPs, but going from a BP project to C++ project is a bit of a nightmare IIRC.

I’m not a seasoned programmer like many of the others, but I have been working with UE4 for over a year and from my perspective as someone who had to learn at every step I would say that some C++ is essential.
I do the vast majority of my work in blueprints, but some things, for example passing arguments from the command line (not the console) to the game, require minimal C++ and cannot be done any other way.

There is a lot more that you can only do in C++. Proper loadingscreens, most of the network stuff (Session like), a lot of useful functions from common classes that aren’t exposed, creating DataAssets, etc.

You could probably live without all of that and stick to Blueprints, but if you have the chance to learn C++, please do it. Once you got good enough at it, it will help you improve your game by A LOT!

And you are also able to reduce the chance of nasty Blueprint bugs (Structs are totally buggy in Blueprints for example).

And despite the UE4 things, learning C++ gives you a good feeling for all kinds of coding languages, which means you can learn Java, C# and such thinks in a blink of an eye.
So you would generally benefit from learning it. :stuck_out_tongue:

If you have a chance to learn C++ , you should. You can combine Blueprints and C++, some complex systems are a lot more efficient in C++.

Blueprints are like training wheels on a bicycle. You can ride a bike and you probably won’t crash and fall over, but you’re still riding a bike with training wheels…

Coding in C++ is taking those training wheels off. At first you’ll be pretty wobbly and unsteady, probably will crash a lot, probably will skin your knees and get a lot of frustration, probably doubt yourself a lot, and be tempted to give up, but with a lot of persistence and practice, you’ll eventually get really good at it and you’ll be way better off for it. Getting good at C++ is a skill which is transferable to other applications and programming platforms outside of gamedev and UE4.

When it comes to UE4 dev, I personally prefer C++ for a few reasons, mostly due to hidden drawbacks of blueprints:

-Blueprints can quickly turn into visual spaghetti, especially with crossed lines and stuff.
-It’s hard to see at a glance what is happening with blueprints. Well formatted code is much easier for me to read.
-Blueprints require maintenance to keep them aesthetically appealing and readable. That means managing the node positions, making sure lines don’t cross too much, trying to keep nodes aligned, etc. These are overhead costs you have to pay for using blueprints, and if you don’t pay them earlier, you’ll pay for them later when you have to come back and maintain them. It’s very similar to code comments…
-Have you ever wanted to copy a bunch of functions from one blueprint to another? It’s a pain in the neck. You have to manually go and recreate each function, set the input and output parameters, and then copy/paste the node graph. With code, you just copy/paste the code and change the class scope. You can be done in a minute (using find and replace).
-Native code has faster performance (but it’s generally not important – algorithm choice is much more important!)
-Code debugging is way better because you get to use the power of the visual studio debugger. You can set breakpoints on any line, traverse up and down the call stack, set watch variables, step into functions, etc.
-Code is a lot cleaner than blueprints. Try to do this in blueprints and see how long it takes you:



TArray<int32> MyArray;
for(int b=0;b<100;b++) MyArray** = (int)(FMath::Rand() * 100);
for(int a=0;a<MyArray.Num();a++)
{
   MyArray[a] += (a%2) ? a*3 + FMath::sin(a) : a * 2 + FMath::cos(a);
}


(this took me 2 minutes to write)

1 Like

This is the number 1 reason to learn the basics of C++. Basic algorithms becomes a hideous spaghetti nightmare very rapidly in Blueprint.

At a very minimum I would learn how to create Blueprint function libraries so you can avoid that horror show, even if you build your entire game framework in Blueprints.

https://wiki.unrealengine.com/Blueprint_Function_Library,_Create_Your_Own_to_Share_With_Others

If devs are quitting because they can’t deal with updating engine versions, then they shouldn’t be updating engine versions. Self-inflicted misery!

Nothing unkind about it, it’s reality. If you’re going to update the engine that underpins your game then you’re going to have to do some work, same as any software development project, you don’t change a core dependency mid-cycle unless you absolutely have to.

I’m not an engine programmer :wink:

While I see your point, migrating engine versions is potentially a bit easier with Blueprints vs C++, I think it’s a relatively minor point set against the various downsides of Blueprints that have already been aired.

If you’re starting out with UnrealEngine and C++, my advice would be to start a C++ project. Start learning how the engine works using just Blueprints, then when you’ve got a feel for things, start building a few simple C++ components and learning how they can be leveraged in a hybrid C++/BP project.

That’s the key thing, neither C++ nor BP is better, but using either one in isolation is definitely not making best use of the tools at your disposal.

Thanks guys for all the help, after reading all your posts I think I will opt for the idea of starting a C++ project, starting mainly with BPs for the project and dabble with C++ as well when I get more comfortable with the code, and also learn how to make the BP and C++ work together.

Thanks so much,

It’s probably better for you to use C++ if you need to, such as if you want to do something that is either very difficult or can’t be done in Blueprints and otherwise just stick to Blueprints. It may be very frustrating for you otherwise. You can always add a C++ class to a Blueprints project later, even rebase your existing Blueprint onto the new C++ class.

Like others I recommend C++ for any serious game development, reusability and flexibility. That being said for hobby development Blueprints are pretty ideal.

I’d also agree the above code is horrible, and if you are going to learn to write C++ you should strive for readability, debugability and try to avoid multiple instruction on a single line.

Yeah, my code is a bit unreadable. I intentionally compacted it a teensy bit to illustrate that I can write four lines of code in two minutes to do the same thing that a full screen of blueprint nodes can do. I honestly think it takes more mental effort to create a blueprint node graph than it takes to write the equivalent code. Just for kicks, I did a blueprint version as well. This took about 8 minutes and looks intimidating. At a glance, I would have no idea what’s going on. I could spend another 5 minutes straightening out the lines and stuff, but that’s overhead costs, which again serve to illustrate my point :wink:

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/MathNode/

As somebody who inheredited a 2300-class BP-only project:

Make your baseclasses in C++.
I had to do a massive rewrite of the project’s internals in C++ because the BP compiler started to **** itself at the circular references.
And BP interfaces suck. They really, really suck.

1 Like

EDIT: Disregard this post. Wrong section. Sorry about that.

If you see this admins, please delete this.

So what are we saying? that C++ is bad because a new version of Unreal comes out and breaks your game? is that what I am reading here?

At this stage C# in Unity sounds more ideal? than C++ and Unreal? especially for 2D games and solo devs?

I learned c++ in college, not my major, so I a lot of the c++ stuff on UE4 is still wizardry for me. I will say, that learning about c++ from a book is great help because you will understand the structure of the classes, the inheritance, etc. I would say I was a noob programmer when I started with ue4. Most of my game design was via visual scripting.

My recommendation is, start with blueprints, so you get a sense of how the engine works and how you do stuff. A lot of the functions in blueprints come from c++ functions, so you also get familiar with various elements of the engine, like line traces, character movements, pawns, etc.

But knowing c++ is going to be needed if you want to ship a good game IMO. Already, I had to have my own engine build to fix some steamworks functions which had the wrong behavior of what I wanted. I also had to edit some plug ins in the engine. And now if I need a general function, instead of doing it on blueprints, I have a blueprint function library, where I make generic functions in c++ and just use them in my blueprints. In order to make the game I am currently making, it would not have been possible to do only in blueprints.

Now I think of myself as an amateur programmer. I can read the code and make sense of it. I can write my own functions and fix certain small issues. But my game is still mainly blueprints because I still got a lot to learn. So start with blueprints, and try to migrate little by little to c++, because it will be better for you and your game in the long run.

My biggest grief from learning to work with UE was that all the Structs were made as Blueprint Structs. This makes it harder to go from BP->C++ whenever you need to because you can’t import a BP Struct in C++.

So I would suggest you go with BP but at least make all the Structs in C++ and use those in BP. Then when you want to move some functionality to C++ it will be much easier.