When to use C++ and when to use blueprints

Hey guys, yet another c++ v. blueprint thread here.

I know this has been answered a few times, but I haven’t been able to find any specifics on when each is preferred over the other.

I know C++ is recommended for ‘core logic’ and ‘critical’ areas of your project, but I’m not sure what those refer to. I’d appreciate if anyone could go into a bit more details on these keywords with possibly an example using a well known game. Thanks! :slight_smile:

Well I know that your supposed to use C++ for things that will be run many times and code that should be executed quickly, and to use blueprints for simple code that is executed a small amount of time in your Program and does not have to be executed quickly. Hope This Helps!

It really is up to what you are more comfortable developing in.

I make everything a base class in C++ and then extend most of those classes as Blueprints. But, that’s just what I’m most comfortable with. It doesn’t really make a difference for gameplay code because you can compile all Blueprints to C++.

If you want one area to make a difference. Put anything in Tick on the Blueprint into C++.

I stick to c++ for the structure, and blueprints for boilerplate.

Example my storyboard / mission-objective system is programmed in c++ and then conditions for completing objectives are in blueprints. I’m not worried so much about performance because it’s something you can come back and work on later with a profiler - just design first.

I find that the C++ Tanks tutorial streams teach a good separation - all the actual logic resides in C++, and the front end is done in Blueprint. The front end encompasses animations, fine tuning of values through Blueprint child classes, UMG stuff, etc. It’s not really about performance, but more about maintainability and extensibility. Written code is far more readable, especially to other people or to yourself after two months, than the inevitable spaghetti of nodes Blueprint results in. It’s also a lot easier to make changes to down the road, since you don’t have to wrestle with splicing in nodes into an existing graph.