Blueprint is powerful but currently it’s too slow. Even lua (not luajit) is much faster (3x~10x) in doing calculation intensive work.
Though BP can be navitized, it will slow down the build time. What’s worse, it’s not a good option since mobile game need to use BP VM backend to enable hot update. Due to this, moving logic to c++ is also a bad choice which will break the possibility to hot update game logic.
As a strong-typed language, Blueprint should have a lot of chances to improve its performance, at least it can be better than lua 5.3. This will make it a more practical language to use widely in development, especially for mobile game which need a lot hot update.
The biggest issue I see with Blueprints is the fact that “nodes” are exponentially expensive.
Let’s say you execute a function created on the Blueprint Graph… it doesn’t exist in C++:
That Blueprint Function is in fact a “graph” containing nodes, each node makes a call to "expand their Exec pins and everytime a node “expands” it can generate multiple (hidden) nodes more before the “Function” Graph finally executes.
So a Blueprint “Function” Graph is something like this:
Function() { // <- VM call cost
Node(); // <- VM call cost
Node(); // <- VM call cost x2 (because this nodes expands and is now 2 nodes)
Node(); // <- VM call cost
Node(); // <- VM call cost x2 (because this nodes expands and is now 2 nodes)
Node(); // <- VM call cost
Node(); // <- VM call cost
Node(); // <- VM call cost x2 (because this nodes expands and is now 2 nodes)
Node()... ... //... and each "node" is a UObject with quite some large memory footprint!
}
if you write that same function from C++, then that “cost” would be:
Function(); // <- VM call cost x1
So the more nodes your graph have the more you’re in trouble lol
Then there’s nativization, but it doesn’t give us room to improve ontop of the nativized code…
Then there’s competitors like Unity working on Visual Scripting that auto generates C# scripts which is compiled LLVM them converted to machine code.
But Epic is swimming in moneis from Fortnite, so not sure if they’re worried about this stuff ^^
Unity’s solution doesn’t really compares here because you cannot use it to hotpatch scripts in mobile and console platforms because your game is not allowed to download native binaries or perform JIT on those platforms.