Hacker News new | ask | show | jobs
by nineteen999 2303 days ago
UE4 has a really nice balance here; you can create your own C++ classes, either by inheriting from UObject (lowest common denominator class), or higher level classes like UActor, UPawn, UCharacter, UTexture etc. There are component classes that can then be attached to these to give you a composition based approach, rather than just pure inheritance.

With C++ you have a very fine grained control over everything, however the compile/link/dynamic reloading cycle can be quite slow and you don't get much in the way of instant visual feedback.

This is where Blueprint classes come in; they can inherit from both C++/Blueprint classes, and can be extended very quickly in the editor using a node editor similar to what you'd find in the UE4 Material Editor and Animation Graphs, Blender, Substance Designer, Nuke etc. The feedback loop is much tighter and you can see the results on screen much more quickly. Downside is that not all API's are exposed to Blueprint, and they are a little slower than C++ classes. This can be mitigated somewhat by compiling Blueprint classes to C++ in recent versions.

1 comments

I am more into the managed languages side of game engines, but as far I know from UE presentations, dynamic re-loading of C++ should be quite ok nowadays.
As I think we have discussed before, it had difficulties at least as recently as 4.18 or 4.19 when you added or removed variables/members into classes or structs other than at the end, which is not totally unexpected. It does mean you have to restart the UE4 editor which can be slow. Also compiling UE4 C++ code in general can be extremely slow. Is is extremely tempting sometimes to prototype some new feature in Blueprint because of this, as a result you can end up with a lot of unwieldly Blueprint code that you never rewrite in C++.