#How do you determine if something should be Blueprints vs. C++

1 messages · Page 1 of 1 (latest)

cedar wigeon
#

Hello everyone. I've been working with Unreal for just a little bit now and in my current project I'm just using Blueprints. Though they can be nice, being a Software Engineer by trade I personally, get a bit annoyed by them. For that reason I'm probably going to lean harder on C++ for my next project and just use Blueprints for more connect these two things type stuff.
But all that got me curious, how do others decide that line? So what do you folks do in your projects? How do you decide when something should be Blueprints rather than C++?

light stump
#

I would say use Blueprints for anything "simple", so things like character controllers and maybe basic player/enemy logic, and C++ for anything more expensive or complicated

#

Like a save/load system I would write in C++, because that way you have more control over the serialization pipeline

#

Actually I'm not even sure if Blueprints has a node for file reading/writing

#

Alright yeah no it doesn't. You can make your own though. But the way you make your own Blueprint nodes is by writing C++ code sooooo for anything that involves file I/O you may as well just use C++ and call it a day

#

Another thing to keep in mind is Blueprint compile times are basically instant, where as C++ compile times are notoriously not. So Blueprints is ideal for frequent iterating, which is especially useful during the learning process because you will undoubtedly make mistakes. Fixing a missing node connection and re-running the game is so much faster than adding a missing ; and waiting an eternity for C++ to compile

cedar wigeon
#

That makes sense. One of the main things for me is that the Blueprints get overly complex and hard to follow after a bit, and with code I know I could always just split things down in a way that's easier for me to follow. But you definitely have a point about speed of iteration

light stump
#

Oh yeah as a system grows it would definitely be worth rewriting it in C++, because not only will it start to become unmaintainable it will also take a performance hit. Blueprints may be fast to make, but they're not as fast to run as actual compiled code

#

But that's why I say use Blueprints for anything "simple" in quotes var your definition of simple may differ. As an example, this is all I needed to do for a first person controller blueprint: