Thursday 8 October 2015

Blueprints vs C++ in Unreal 4 and vs C# in Unity



An alternative to the visually-based flowchart design of Blueprints-based programming, is the code and text-based C++, with both forms being available in Unreal Engine 4 (Unreal 4 b, 2015) they both have their own advantages and disadvantages for a games developer to use. The main big difference is Blueprints are around ten times slower than C++ (JamesG, 2015) and work less efficiently, but because you can actually see a visual representation of the programming in your game with Blueprints, it’s a much more “user-friendly interface for Blueprint visual scripting and other systems” (Unreal 4 c, 2015) and easier to learn. 

The Blueprints System from Unreal 4, screenshotted from (Chad Reddick, 2014)

An Unreal 4 project can contain both C++ and Blueprint programming, as Blueprints are really a friendly exposure of C++ that is easier to grasp. This allows professional developers to efficiently code their games using the most efficient and effective way possible, without just sticking to one style for the entire game project. (cmb, 2014) Overall though both programming methods are efficient, deep and complex enough to get the job done for a variety of games and situations, but with C++ still having the upper-hand when it comes to the high skill-floor and skill-ceiling in more advanced level coding and complexity. (Browett.T, 2014)

The C++ Coding Screen in Unreal 4 (RuBa1987, 2014)
Finally we have another form of programming outside of these two I mentioned, which is Unity's main programming language and is unable to be used in UE4. It's is C#! (pronounced C-sharp, not C-hash!) It can be used for a variety of applications outside of just games like in Java and Microsoft's .NET Development Environments, (Csharp.net-informations, 2015) giving it an edge over the strictly games-based Blueprints scripting. Plus those who are experienced in C++ will be able to pick up C# much faster, as the two are similar in some regards, such as them both: "having large API's and documentation online" and "both having strict compiler conditions which are checked such as array  indexes, initialisation of variables before use, etc." (Tiwari, 2015)

It's also easier to edit code in Unity as a whole than it is in Unreal 4. As when you create a C# script in Unity you can get a preview for what the whole code contains in the Inspector, rather than having to switch to Microsoft's Visual Studio in Unreal 4 just to see the code of each C++ class. Visual Studio as a whole is more inconvenient too, as most PCs will have to install the software separately (usually when suddenly creating a new C++ class being a big hassle), as compared to Unity's MonoDevelop which has a much simpler interface and comes installed with the software too!

Unity's MonoDevelop, a streamlined interface with less clutter than Visual Studio. (Zwodnik, 2015)

No comments:

Post a Comment