Some Question for my professional article
I am currently writing a professional article for my diploma degree in Game Programming. The topic is "Visual Scripting compared to Textual Scripting in terms of technical performance and efficiency in the process of game developing" and i use UE4 BP and C++/C# code as representatives. So the basic question is: Why are Blueprints awsome or awsomer than C++ ;-P
In order to compare the performance of BP to "conventional" code I am very interested in what happens behind the scenes of the unreal editor. So I hope theres some Insider Unreal Developer who can answer me some questions.
Some question that i would like to answer in my article would be:
My personal guess is, that BP and C++ code have a very similar outcome after compiling, cause the structure of both is also very comparable. That would mean, that theres if ever a minimal difference in runtime performance. But for my article I need proofes for that, so if i could get some answers ... and maybe the permission to quote some of them in my article ;-) ... that would be really awsome
Thanks in advance -Max
asked Aug 07 '14 at 11:42 AM in Everything Else
I'm not an expert on how UE4 blueprints work behind the scenes, but I have spent a lot of time using UE4 blueprints and working with the underlying C++ source.
The first thing to keep in mind is that blueprints are a type of scripting language, whereas C++ is not a scripting language, so you can't compare them directly. It would be easier to compare UE4 blueprints to a managed language such as C#, but they still aren't the same. Behind the scenes UE4 blueprints are usually just calling existing C++ methods. So blueprints are a scripting language built on top of C++. The way to think of this is that blueprints are used to automate existing functionality that has already been coded in C++. This makes the functionality of blueprints limited to what has already been defined in the C++ source for blueprints to use. This doesn't mean that blueprints are inferior, it just means that they have a different purpose. Blueprints were designed so non-programmers could automate existing C++ code to create games. Epic has done an amazing job of creating a visual scripting language that is easy to use, but still retains a lot power. I think the most important feature of blueprints is the fact that they can be extended by the user using C++. If blueprints in UE4 were not extendable, I would probably never use them.
Answer #1: Take a look at this documentation to see how the blueprint compiler works behind the scenes:
Answer #2: Programming the same behavior in C++ (assuming optimum code) is always going to be faster than the BP version, but it may only be slightly faster. In some cases, the BP will just be calling the underlying C++. In that case, they would run nearly the same speed, except for the overhead of the BP making the call to the C++. Epic developers have been quoted as saying that BP's may be 10 times slower than C++, but I believe that was a generalization that won't always be the case. Here is a quote from Billy Bramer (Unreal Engine Developer) that mentioned the 10x speed difference:
Answer #3: The output of a BP will never be the same as the C++, since at a minimum it will always contain the extra calls to the underlying C++. It may also contain additional code depending on how the BP nodes are connected in the blueprint.
answered Aug 07 '14 at 06:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here