When creating a new Unreal Engine project, one of the first decisions you’ll need to make (usually right after ‘What do I call it?’) is going to be between using either Blueprint or C++ as your foundation. This decision is going to drastically affect how you develop your game, which makes it vitally important that you understand the strengths and weaknesses of each model. Making an informed decision now will save you the tedium of having to switch mid-production later, which can be a big hassle.
Luckily in this case the solution is simple. Use both of them. In Unreal Engine 4 both C++ and Blueprint components are designed to compliment each other. Unless you have an absolutely ironclad reason to commit only to Blueprint, create a C++ project and you can get the best of both worlds.
As we’ll break down in the next section, both C++ and Blueprint have their own clear advantages and disadvantages. Luckily, when used together they can compensate for each other’s shortfalls.
- A solid teaching tool to get familiar with common patterns, and how to think like a programmer.
- Acts as a well-paced introduction to how Unreal Engine works.
- It’s much faster to get a prototype off the ground, and to get your game in a playable state.
- Many of the more advanced engine features are limited or unavailable.
- As a higher-level language, in general Blueprint will run slower than C++.
- Large graphs with dozens of nodes can become unwieldy and difficult to read.
- All of Unreal Engine’s features are available right from the start.
- Those familiar with C++ will be able to dive into the engine’s source code.
- Will generally execute faster, especially for low level operations.
- There is a greater barrier of entry.
- It will take more work early in production to get your game up and running.
- There is less of a safety net, making it easier to crash your game and/or the Editor.
In the end, you may find yourself leaning a little one way or the other. That, like most things in game development, will likely depend entirely on you and your team’s experience, and what your new project is all about. At the end of the day the optimal way to use utilize the power of the Unreal Engine will be highly specific to your project.
Still not sure about your decision? Let’s look a bit deeper.
What is Blueprint?
The far more advanced and flexible older brother of Unreal Engine 3’s Kismet, Blueprint is a visual scripting language that allows developers to create the logic for their games by connecting graphically represented nodes together. It’s a bit like a giant flow chart, where the chain of the code’s execution (represented by a white line) can be followed through the graph, and what is happening more easily understood.
Epic Games’ heavy focus on Blueprint in the fourth iteration of their engine lowers the barrier of entry and allows non-programmers to dip their toe into creating functionality, while also providing an extensive and fully integrated toolset for advanced users.
Creating a Blueprint-only project
Pro: Blueprint is accessible, well-documented, and easy to grasp for those who are new to writing code for games. For many it is their first introduction to creating game logic, and acts as a springboard for more complex programming languages.
Pro: Blueprint will walk you through how Unreal Engine expects you to program your game, firing off warnings whenever you try anything that might cause your game to lock up or otherwise crash. It acts as a fantastic introduction to how the engine processes your instructions, and basic best practices.
Pro: When using Blueprint it is a lot easier to turn your ideas into playable prototypes. It compiles faster, lets you work entirely within the Editor, and has been designed to be modular. This means developers can drag and drop whole sections of gameplay logic into their graphs all at once. With Blueprint you can be off and running within minutes.
Con: On the flipside, Blueprint graphs are very visual – which means they inherently take up a lot more screen space to present the same amount of code. What might be achieved in 4 lines of code in C++, in Blueprint may completely fill your screen with interconnected nodes and wires. Things can get out of hand fast, leading to what many in the community call “Blueprint Spaghetti”. Yikes!
Con: In a Blueprint-only project, many of the more obscure (but often not that obscure) features of the engine will be either severely limited, or not available at all. This was done, I imagine, to streamline the process and stop newer developers becoming overwhelmed with their choice of nodes, but sometimes the features that Epic chooses to leave out by default can seem quite arbitrary.
Con: From the very first release of Unreal Engine, Blueprint has been famously slower than C++ – especially with low level tasks like mathematical calculations. This is still technically true, and in general using Blueprint over C++ will make your game run slower. However, vast improvements have been made over the years, and depending on the way your game functions this may or may not be a problem. You may not notice a difference in the performance of your game at all.
What is C++?
C++ is a ubiquitous text-based programming language found in software all over the world, from the operating system you’re using right now, to a whole host of popular game engines. It is fast and powerful, and it is the backbone of the Unreal Engine.
Committing to only using C++
Pro: When creating a new C++ project, all of the engine’s tools, features and options will be made available to you right off the bat. If you know what you’re looking for – you’ll find it!
Pro: If you’re working with C++, then you will have the option to work within the actual Unreal Engine source code and make any change you want. All you need is a GitHub account, and the courage to dive headfirst into the unknown. Naturally, this is only recommended for advanced users who are very comfortable with the language. Have a look at this guide from Epic for more information.
Pro: C++ functionality is usually much quicker than its Blueprint equivalent, especially when doing mathematical calculations. This may not sound like a big deal for smaller games, but for even medium-sized projects there can be thousands of math operations happening every single frame. It can add up, fast!
Con: It has never been easier to learn how to program, but that doesn’t necessarily mean it’s an easy skill to learn. For a beginner, coding in C++ is generally not as intuitive as Blueprint. If you’re new to game development, programming, or even Unreal Engine specifically, there will be a more significant upfront cost in learning the language.
Con: C++ projects simply require a greater amount of lead-in time to get up and running. The process is less streamlined than Blueprint, and as a consequence there are just more hoops to jump through, even for experienced users.
Con: This is the other side of the coin to the advantage of having all of Unreal Engine’s features without restriction immediately at your fingertips. It’s just a lot easier to accidentally break things. Blueprint’s compiler will hold your hand and warn you if you’re doing something dangerous, but in C++ you are expected to know a bit more about what you’re doing. With great power comes great responsibility and all that.
Using both Blueprint & C++ together
Now we’ve reviewed your options, let’s have a look at how they can be used together – and how their combined strength can be used to overcome their individual weaknesses.
Pro: When using both Blueprint and C++, you will be able to leverage the faster iteration and compile times that Blueprint affords while you’re prototyping, but when you’re satisfied you’ve proven your concept and you’re ready to optimize, you can then move sections of your logic into C++ as required. Check out the documentation for more information on when you might want to do this.
Pro: With a little knowledge of C++, you’ll be able to ‘expose’ features that were previously off-limits to Blueprint. By creating your own nodes in C++ that can then be dropped into your graphs within the Editor, you can significantly expand the capabilities of your Blueprints in just a few lines.
Pro: Using Blueprints lowers the barrier of entry for you and your team to collaborate on game logic. While programmers will still be able to work within C++, creating the architecture and more advanced gameplay systems, your artists and level designers can use Blueprint to create higher level features, like placing triggers and firing events.
Well, there you have it. I hope I’ve helped you make your decision. My recommendation is that no matter what kind of project you’re creating, generate a C++ Project. Even if you never open Visual Studio, at least you’ll know it’s there if you need it.
The examples I have given in this article are based on my seven years of experience working as a technical artist within Unreal Engine 4, but it’s important to remember that there is no ‘correct’ way to develop a game. When all is said and done, this is your project – and your team. Blueprint or C++, use whatever you’re most comfortable with – and if you do change your mind later, that’s okay too. Epic has you covered.