by mgreenleaf · 6y ago · 0 comments
The issue is that when you get into complex logic and number crunching, it quickly becomes unwieldy. It is much easier to represent logic or mathematics in a flat textual format, especially if you are working in something like K. A single keystroke contains much more information than having to click around on options, create blocks, and connect the blocks. Even in a well-designed interface.
Tools have specific purposes and strengths. Use the right tool for the right job. Some kind of hybrid approach works in a lot of use cases. Sometimes visual scripting is great as an embedded DSL; and sometimes you just need all of the great benefits of high-bandwidth keyboard text entry.
https://blueprintue.com/blueprint/jt69wz7e/
Compare that with this bit of pseudocode:
function inputAxisHandleTeleportRotation(x, y, actingController, otherController) {
if(actingController.isTeleporterActive) {
// Deactivate teleporter on axis release, minding controller deadzone around 0
if(taxicabDistance2D_(x, y, 0, 0) < thumbstickReleaseDeadzone) {
sendEvent(new inputTeleportDeactivate(actingController, otherController);
}
else {
actingController.teleportRotation = getRotationFromInput(x, y, actingController);
}
}
}
Which one is more readable for someone who's even a little bit experienced in programming? Which one is faster to create and edit?Regarding your point about complex logic and number crunching can be alleviated by using a 'Math Expression' node... which allows math to be written in textual form in a node.
Blueprints are great for the material editor where everything is going to terminate in a specially designed exit node and there is little branching logic, but even for basic level scripting it is more messy than it used to be in the industry.
1) It took me longer to create blueprints than it would have taken to write the equivalent code. I kept finding myself thinking "I could do this in 5 seconds with a couple of lines of code"
2) The blueprints quickly became unwieldy. A tangle of boxes and wires that I couldn't decipher. I find code easier to read, as a rule.
3) I didn't find it any simpler than writing code. A Blueprint is basically a parse tree. It maps pretty much 1:1 to code; it's just a visual representation of code.
I'd argue that 90% of it is just that they work out of the box. You download the engine bundle and you can start doing blueprints. Being able to write normal code requires you to compile UE from source, which is a non-trivial thing for any large C++ project.
I'm pretty sure if they embedded Lua or Lisp directly into the engine, and provided a half-decent editing environment in-editor, that it would meet with success just as well.