Download

Blueprint Vs C++

hi every one .
i wanted to know the different betwen the blueprint and C++ are the same or not and is the blueprint is limited
so basicly a want to know who si the perfect one

I have little to no experience with either, but I can tell you I am sure neither are “perfect”

I can only imagine C++ being a lot more flexible to work with in the long run

Use Both C++ and Blueprints

Both Blueprints and C++ have their advantages!

C++ is better for math and intensive calculations that you want to run at highest possible speed, the kind of speed people used to have to pay $1000’s of dollars for prior to UE4 (we are all quite beyond-lucky that Epic is giving us C++ for for free!).

C++ is the only way to add new code to the Engine and do things UE4 has never done before, bringing in third party code libraries to add whole new features to the render code path of the engine or any other low-level aspect of the Unreal Engine.

Blueprints is the ideal way to handle asset references, and spawn particles and play sounds, and any thing that you’d want to tweak over time and iterate over quickly. So all core C++ variables should be exposed to Blueprints for fast-editing / iteration. Blueprints is also involved any time you want to use UMG for your game UI! Yay for UMG!

Blueprints is also required to involve the maximum number of people in your project so everyone can participate in building the game simultaneously. Blueprints offers unparalleled gameplay iterative testing speed via PIE and all the C++ variables that you exposed to be tweaked in the Editor!


**Asset Referencing**

Asset referencing simply must be handled in Blueprints because hard coding asset paths in C++ can break during packaging and simply break the game. You can't even rename a single asset if you are referencing it via a hardcoded path in c++, let alone move folders around and expect the game to sitll work!

This means every C++ base class should a have a Blueprinted version that fills in all of the asset references created as UPROPERTY in the C++.

Gameplay Coding Summary:

C++ ~ Core engine that performs calculations at highest speed and then tells Blueprints when to spawn particles/effects/sounds that can then be easily tweaked in the Editor.

Blueprints ~ Asset referencing and fast iteration of test code and all C++ variable tweaking to fine tune the core C++ engine.

This way you get the best of both worlds, and can really enjoy using both C++ and Blueprints!

:heart:

Rama

Somehow i prefer Blueprints, it is harder to keep all code under control (ie. not to make total mess).
Or maybe i am just used to C++ so i keep it clean even not thinking about it, while i did not develop some internal rues for blueprints yet (but i am going there).
What i love in Blueprints its that you can see execution flow. I use Sequence a lot so each task is usually different branch of graph.
Add to this some comments with colors (always same color for same type of task) and this whole thing looks like flowchart graph.

There is one bad aspect to blueprints: search usually fails miserably when you use advanced features like dispatchers, blueprint parents etc.

I guess

If you are really good at C++, use it.

Blueprint are great, easy to use, but a little slower. But easier to debug in my head.

Narg

Like Rama says, get the best of both worlds by using all the things!

If there is such a thing as “perfect” (hint: there isn’t) it is to use C++ and BP respectively where they make the most sense.

I’m currently working on a toy project (ClickerOps) which is mainly used as a test bed for my Big Pie-in-the-Sky project in order to find out where the main hurdles are. In the process of doing that I’m maintaining a small text file where I write down things I’ve discovered along the way. The first paragraph in this doc says: “Favor C++ over BP for: base classes; struct, enum and interface declarations/definitions; game data serialization. Use BP for everything else.”

I may add one more advice:

If you ever plan go for multiplatform release and your game is not super complicated, stick to blueprints only.
Unless you are skilled in C++ on every platform you want to deploy for.
There are multiple technical difficulties with compiling C++ project for different platform.
For eg to deploy C++ project for iOs mobile you need to have Mac

I prefer the blueprints and am sure they can only get faster and more powerful as the engine evolves…

Bumping my answer to this question as it comes up a lot

Rama