rogerdv said:
So, my question is, how much Blueprint and how much C++ there are in AAA games made with Unreal?
There is always a mix, but I couldn't give a percentage number. There are a lot of blueprints, and there is a lot of plain C++. Blueprint compiles and ultimately shakes out as c++ code, and ultimately it matters very little what percentage.
Designers and artists fill in a lot of blueprint. If it isn't something you'd trust those groups with, don't expose it as a blueprint, or instead work out an interface that they could use.
Vilem Otte said:
they were partially used even in Fortnite, Ark or Bright Memory
My name is on both of the first two. For both Fortnite and Ark, every creature, weapon, and tool had some amount of blueprint script on them. Programmers provided the building blocks, then everybody built from them. As the games grew designers had a broad base of tools needing less fresh c++ work, although there was still always more to do. Later in development designers were able to build up many creatures and weapons using no new c++ code, building entirely from the library of existing code.
Alberth said:
I don't know unreal or blueprint, but at a high level view it seems to me you have 2 programming languages for the engine, C++ and blueprint. … The difference between languages is thus about how easy it is to express what you want.
Yes. Blueprint is a visual language, c++ is a more traditional language. Both get compiled. Both are used, and more besides.
When something is easier or makes more sense in blueprints, leave it on that side. There are plenty of scenarios where it is easier on the c++ side to just leave certain tasks to the blueprint's code generator rather than hooking it up in c++. I've made plenty of blueprint-accessible functions and simply provided handlers and delegate interfaces rather than doing the work of making a properly asynchronous system in c++, easy since functions are synchronous and expected to be fast, custom events are async.
Similarly, when something is easier in c++, leave it on that side. Plenty of times designers will have a massive set of math they've built in a blueprint and just want a series of math operations based on a few parameters. I can encode the function in minutes when it would take ages to build in blueprint, so c++ is the clear winner there.
Object lifetimes are expressed differently between the two, which is neither good nor bad, just a difference in the two languages. Sometimes it is easiest to rely on the C++ lifetimes of objects, managing them through the way they're processed in code, using them with a lifetime known better by the programmer. Sometimes it is easiest to rely on the blueprint's lifetimes of objects, creating them and reusing them through a series of operations with a lifetime known better by the designer. Both have strengths.
Blueprints are slower to call and work with than C++, and they've also got boilerplate stuff before and after, built-in safety requirements and error handling, and do lots of work behind your back. Sometimes that's a good thing, sometimes that's a bad thing.
Blueprints do a lot of things well, and some things badly. C++ can do whatever you want, but some is difficult or ungainly. Both have their strengths, use them both.