Download

Programmers and blueprints

I’m wondering how many people, with an effective knowledge of programming, actually use blueprints.
Superficially they seem amazing, and initially I was very excited about them. But the more I look at them, the more impractical they seem.
Blueprints are very… Verbose, to put it mildly.
Let’s take a basic math expression for example.
Say you want to program something like Float1/Float2*(Var1-Int1+(Var2*Var3))
You can type that out in C++ in like ten seconds, and understand it fairly easily just by looking at it…
If you want to do something like that in Blueprints though, you would literally need at least 11 different nodes. You wouldn’t even be able to fit it all on screen, and God save you if you want to understand how that works without commenting.
That’s just a single line of math.
Is there something I’m missing about it? It really feels like the sort of thing that’s just there to let non-programmers set up basic level functions in a team.

Blueprints are indeed very powerful and easy to use, but I believe the recommendation is still to do the heavy lifting with C++ and then do high-level scripting with blueprints. This is partly for performance reasons (I believe blueprints are around 10 times slower than native code, though that may have changed), but also practicality as you said.

I’d hate to try debugging an entire game written exclusively in blueprints :-S

I’d put that math expression into a function in c++ and use UFUNCTION(BlueprintCallable) and call the function in my blueprint. Or create a blueprint function instead. And yes blueprints do get messy/unreadable/unmanageable as they get larger and larger. I think ue4 works best when c++ and blueprints are combined instead of just using one of them.

You can actually use math expressions as a single node in Blueprints: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/MathNode/index.html

RE: Your original question, I generally prefer to build extensible systems in C++ and flesh out the details in Blueprints, as they’re very useful for prototyping and quick iteration, but I’m also obviously biased.

Cheers,
Michael Noland