Not to make any assumptions, let’s ensure we are on the same page.
What coding language does Unreal Engine use?
Unreal Engine uses the text-based programming language, C++. In addition, Unreal Engine uses visual scripting called Blueprints which utilizes a faster programming option via drag-and-drop. (More info on Blueprints and C++ below.)
What is Blueprints?
Blueprints, or visual scripting, is a programming language done within Unreal. Visual scripting is coding via a drag-and-drop method, connecting graphics rather than text.
What is C++?
In addition to Blueprints, Unreal Engine uses C++, a text-based programming language. It’s low-level, yet versatile, and learning it will allow for the solving of complex problems and understanding of how programs work.
Which is better?
Hint: it comes down to which is better for the person asking the question. Each language can accomplish the same tasks, but one might be better suited than the other given the situation.
That said, we will go through the details compared to each.
One advantage of using C++ to create game mechanics is greater flexibility when it comes to customizing how the game works. Meaning, in C++ there is access to the entire game’s code rather than bits and pieces in Blueprints.
C++ mechanics are also executed more quickly than Blueprint versions, and while this might not be noticeable through beginner projects, it is important to keep in mind as one continues down the game development path.
Another advantage of C++ is organizing mechanics that use certain functions like Tick or BeginPlay. In C++, mechanics can be kept organized, but in Blueprints it may be difficult to connect several different mechanics to a single Event Tick node.
One of the biggest disadvantages of working with C++ is that it’s easier to make mistakes when creating game mechanics. Most errors will likely be minor but some will be harder to track down, and in some cases may even crash Unreal if the error is critical.
On the flip side, it’s very difficult to crash Unreal inside of Blueprints, and harder to cause game-breaking conflicts.
One advantage of Blueprints is that it’s often quicker to create a new game mechanic because of the ability to take advantage of pre-constructed nodes; creating nodes and connecting them will often take less time than typing out the code and compiling it.
Blueprints also have an advantage when it comes to the visual and 3D aspects of game mechanics. It’s much easier to create a collision box and set the proper size inside of a blueprint than it is guessing through trial and error in C++. For this reason, almost all collision-based mechanics should likely be created inside Blueprints.
While Blueprints can be quicker than C++ when it comes to creating most functionality, it can also be messier. Creating complex game mechanics with Blueprints can create a huge jumble of nodes and connecting wires if not careful.
This can make it harder to tell where certain parts of the game mechanics are located or troubleshoot errors if the mechanic isn’t working properly.
Which should be used?
Again, even though Blueprints and C++ excel in different areas, the one that should be used is the one that offers the most support and comfort with whatever is trying to be accomplished.
Developers should keep this in mind: they can both create whatever functionality that needs to be added to a game, so there isn't any need to force the use of one over the other if it is more difficult.
Teens interested in Unreal Engine game design can learn more through our Virtual Tech Camps: