3

I'm considering my options for a game engine. I did the Twin Stick Shooter tutorial. What frustrated me most is that most of the programming is done in Blueprints, which is this ugly (being subjective here, but not for long) graphical programming. The whole logic of the game was done with boxes... and I find this horrible! I even run away from Qt Designer and design my GUIs with pure coding and layouts.

Going back to being objective, the problem there is that the "Twin Stick Shooter" is a very, very simple game. Yet, the diagrams were very complicated and big at the end. I don't find this very maintainable without issues, such as tracking changes over time using git or any other versioning tool. Unlike C++, where maintaining large code is a very old problem that is solved in many ways, and versioning systems play with it very well.

My question is: Can this same game in the tutorial (or any game in general) be done with all the logic deployed in C++ (or maybe less than 5% blueprints), instead of deploying it all in Blueprints diagrams (like Twin Stick Shooter)? Given that I'm not an expert in Unreal Engine, I think there's a good answer to this question from an expert, who can explain what can and can't be done purely in C++, and why it would be good or bad to do that.

The Quantum Physicist
  • 21,050
  • 13
  • 77
  • 143

2 Answers2

3

Basing on my experience with UE4 i'll answer: yes.

Primary Blueprints nodes and objects are made with C++ and are usually accessible through C++ engine API. In fact C++ versions of BP nodes are usually more complex to use (i.e. have more possible parameters).

I've personally found that any important aspect of game like networking, UI, game logic and level transitions could be done in C++.

(...) and why it would be good or bad to do that.

UE4 creators say that Blueprint system was developed to help artists and non-developers to use engine. Blueprints system is also very helpfull in game logic prototyping.

Thanks to Blueprints elasticity and creation time lot of developers (including myself) decide to use mixed approach, when you create low level, complex or expensive code in C++ and expose it's API to Blueprint system. It helps to separate core code from high level functions which are a subject of numerous changes and adjustments (benefit: BP are easier to debug and it's compilation time is much faster).

One difficulty I found with mixing BP and C++ is issue with using BP classes in C++ code discussed more detailed here.

I don't find this very maintainable without issues, such as tracking changes over time using git or any other versioning tool.

UE4 has Blueprint merge tool but i've never used it.

JKovalsky
  • 338
  • 1
  • 6
3

From the perspective of a programmer with 20 years of C++ experience but only a few months of UE4 practice...I would say yes, but don't.

I agree with you about Blueprints - simple operations that would take one or two lines of code require five or six Blueprint nodes, and as a programmer it's much harder to read. You CAN do anything in C++ with Unreal. But you have to learn and work with the existing corpus of engine code, and Unreal is a complex and powerful beast. Even with years of C++ experience I am finding it really difficult to do simple things because the engine demands them to be done a certain way.

Honestly, for something like a twin stick shooter I would totally recommend Unity instead.