Blueprints vs C++

There is a lot of questions like:

  • Can I create whole game using Blueprints only?
  • What about performance if I’m using Blueprints?
  • Which should I use – Blueprints or C++?

I will try to answer those in this post.

Basically Blueprints are powerful for rapid prototyping. You can create whole game prototype (or functionality prototype) in Blueprints much more faster than in C++. Yes you can create whole game fully in Blueprints but there are a couple of things that can’t be done in Blueprints:

  • Fully multiplayer game, (MMO, Coop games) there is still lot of things that need to be pushed to Blueprints. It depends on your game. For my example – Coop Standing Shooter I can create multiplayer with Blueprints only. But if you are creating MMO or something bigger than I’m you should learn C++,
  • SDK support. For example If you want to use Game Center Multiplayer you need to implement it by yourself in C++, if you want to add your own analytics it need to be implemented in C++, if you want to implement AdMob you need to do that in C++. Basically all new functionalities need to be implemented in C++,
  • There are still problems with Data Driven Variables (from XLS) in Blueprints. In our projects we needed to create them in C++. It’s easy but still you can’t do that in Blueprints only,

Another things that you should think about when doing Blueprints only game:

  • Blueprints are 10x slower than C++. If you have math or something in Tick it will be slower. On PC you won’t see that much change but on consoles and mobile you will see the difference,
  • Full game done in Blueprints is hard to read. You need to think how can you increase readability of your blueprints. (use components, split your blueprints, use object-oriented methodology – don’t try to put everything in one blueprint – I will be trying to learn that later in blog)
  • Cycling References – this is the most important thing that you should think about when developing a game in blueprints only. It’s really easy to come up with cycling reference issue. Before 4.7 your game will crash, currently 4.7+ blueprint that have cycling reference will not work correctly. If class A have reference to class B, and class B have reference do class A you are increasing chance for cycling reference issue. If you are changing variables from class B on class A chance for cycling reference is greater. The same thing is in C++ but programmers know about it, level designers not. You need to be careful,

From my experience the best approach is:

  1. Prototype your game or functionality in blueprints but extend from classes created in C++,
  2. If you are happy with your prototype move all math to C++ (which will be based class) In blueprints leave events and simple functionalities that doesn’t are much math involved. This step is really easy for someone who doesn’t know C++. In blueprints you are implementing code you can do it in C++ as well if you know how to create a class / functions / variables and compile them,
  3. Always keep in mind that someone will be using your Blueprints. Thanks to that you will focus on readability,
  4. Iterate -> learn -> improve. Don’t be afraid to create something from scratch if you are feeling that it can be implemented better with more flexibility,

So you should be using both. In this blog I will use Blueprints only but I will try to point out which functions should be moved to C++.

3 thoughts on “Blueprints vs C++

  1. Hi, you say “Blueprints are 10x slower than C++”. Why ? BP are only graphic representation of a C++ program. It’s not only visual scripting, no ? I mean: when you exec it visually for debug purpose, it’s very slow. But, when you export your game, all BP are not compiled ?
    10X Slower… Is it from your XP or something written by Epic ? I don’t understand why BP would not be translated in C++ and compiled, to make them as faster as C++ functions.

    • Yes Epic confirmed that here https://forums.unrealengine.com/showthread.php?3035-New-Twitch-livestream-with-Fortnite-developers-Thursday-April-17&p=19464&viewfull=1#post19464

      Yes blueprints are graphical representation of c++ functions but they need to be read (interpreted) by C++ and this takes more operations than writing C++ code.

      For example if you are doing branch in Blueprints it will be interpreted by C++ like this:
      – Execute pin to Branch,
      – Check Branch node,
      – Get bool variable,
      – Check if Bool variable is true or false (this is the part which you can write in C++ without anything else)
      – Execute output pin,

      In C++ you are doing only variable is true/false. This means less operations.

      As I said – this won’t bother you on PC these days. But it’s good to know how to improve CPU performance in blueprints (use events, don’t use ticks, move math operations to C++) if you are doing Mobile game or Console game.

    • How could they not be slower? Their is no recompilation required for blueprints so there is a whole interpretation system at work.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.