Blueprints vs coding

Hi all! I’m new to the whole game development process and I was just wondering if I should still learn how to code even with this new blueprint scripting process in UE4. What kind of things can coding still do for me that the new blueprints in UE4 can’t? Any help appreciated.

Coding is better at creating complex interactions and behaviours, or heavy math.
Blueprints is best at editing current behaviours and configuring stuff.
What i normally do, is code the complex parts in C++, and then assemble them in blueprints.

Thank you for your response. Would you be able to give a quick example of what kind of game behavior you would have to do complex coding for? That blue printing is not able to handle by itself.

Hey-- thanks for your reply-- i have a similar question and would be grateful for any answer-- Can I get access to the underlying C++ code that I create in the Blueprint system < say-- for a constructor in a class blueprint > and save it to notepad or something to work with in Visual Studio ??- or, conversley-- can I load some of my C++ code into blueprint somehow and bypass the GUI to manipulate it after I load it in to tweak or whatever ?? Am still kind of stunned that this all came out like… 5 days ago ?? && am going about 14 hours a day trying to get into the loop on this. Again-- am grateful for any reply, && kind regards, mark-p.

For example, ive coded some AI, giving access to some events like “SeeEnemy” or “Hear Noise”, wich i calculate and call from C++ ( i run a check every 0.1 seconds to check if the AI can see someone). And then, i have some functions like “AttackTarget”, or “WanderAround”, wich i call when i want the AI to do that, also functions like “meleeattack”.

Hi Mark,

Blueprints don’t actually compile down to C++. Their parent class may be C++ (or another blueprint), but they actually build a new UClass in memory, with a UFunction containing bytecode for each graph in your blueprint, and a UProperty per member variable you declare. There is a text-based backend that you can enable (used mainly to debug the compiler when extending it), but it’s a long sight away from text you’d want to paste into your C++ class (CompileDisplaysTextBackend in BaseEngine.ini if you’re curious, but it’s not pretty…).

However, going the other way is very easy. If you want to expose new functions or variables from C++ to blueprints, you just add BlueprintCallable to the UFUNCTION() declaration, or BlueprintReadWrite to the UPROPERTY() declaration.

Cheers,
Michael Noland

Hey Michael-- thanks a lot for the reply. I am going to drop everything else and go 100% with UE4. You’re a good guy && i appreciate your time.
kind regards, .

Perfect explanation, guy. I wasn’t searching this subject, but your answer helped me a lot.

Programming a game now sounds me simpler - I have the impression that we hitch it very much.

Many thanks.

What prevents blueprints from being compiled to C++? It seems to me that a blueprint is pretty much a pre-constructed AST ready to be used. I would think that it wouldn’t take too much to convert a blueprint to a Clang AST. Since Clang ASTs can be both directly compiled to machine code as well as dumped back to valid C++ code, this seems it would be a viable solution. This would both speed up runtime for blueprints and make conversion between blueprints and C++ easier.