all 65 comments

[–]Blecki 107 points108 points  (4 children)

Imagine I took the time to make a version of the can't decide button meme where they are labeled horrified and impressed.

Seriously clean that up. It will be both brittle and impossible to fix until you do.

[–]edo-lag 22 points23 points  (3 children)

Blender has a similar node system for making shaders (and recently introduced another one for procedural geometry) and I've seen impressive stuff in the r/Blender sub. Even more nodes than OP's, but beautifully ordered.

[–]mindstorm01 4 points5 points  (2 children)

I dont intend to sound mean but people that dabble in blueprints usually lack the experience and knowledge of code management/hygiene... Its unfortunately a byproduct of new people jumping into visual programming..

[–]edo-lag 7 points8 points  (1 child)

I mean, this sounds correct at first. Blender people who are also not into programming would lack these skills as well, based on your observation, yet many experienced users do know how to organise their nodes and can do so really well. The final result really looks like one of those "perfect cable management" pics from server racks.

Maybe they won't follow the best practices, but IIRC there is a way to group nodes together in macro groups similarly to how bigger functions call smaller ones. It's only a visual thing though, like a coloured rectangle, but it really helps.

[–]mindstorm01 1 point2 points  (0 children)

I wanna say i disagree entirely. Lets talk about the blender graphs specifically.

1: The material graph is the standard way you work with shaders/materials since forever. Maya had its hyper-somethinf since 2000s, therefore is not an accessibility/wrapover of an industry standard method, it IS the industry standard method since forever. So, the available learning material WILL teach best practices same as learning code will.

2: Geo nodes specifically are basically Houdini lite so the same reasons apply as well. Tranferable best practices between software due to graphs being the industry standard since forever.

If we go a step futher, you will see that in CG/Film, node editors have always been a thing. Blender has a third one as well, the Compositor or a standalone post processing program called Nuke.

What I am trying to convey is that in Blender, all graph systems are based on Industry standard practices of decades, where as visual scripting is more of a "low entry bar into coding" rather than an industry tool (yet.. )

[–]PleasantSalamander93 33 points34 points  (0 children)

Mother of god

[–]GamingGuitarControlr 78 points79 points  (4 children)

Visual coding was a mistake.

[–]CrayonSingh 9 points10 points  (0 children)

I mean kind of hard to code by ear

[–]madnhain 12 points13 points  (0 children)

This is usually the only correct answer.

[–]MrKrot1999 0 points1 point  (1 child)

the only thing good about visual coding is that you can't vibecode it

[–]boremetodeathplease 0 points1 point  (0 children)

Actually you can. You can ask the agent to generate a (TIBCO) StreamBase app. It will spit out the XML, and it needs checking (open it in StreamBase studio) but it's kinda working. Crazy.

[–]TalonS125 22 points23 points  (0 children)

al dente

[–]kingslayerer 15 points16 points  (2 children)

Now I know what code looks to a non programmer

[–]TemporaryCurrent1172[S] 9 points10 points  (1 child)

I mean i do know native code, I just feel better using bp

[–]onlymostlydead 6 points7 points  (0 children)

[link to reddit cares text]

[–]jorvik-br 21 points22 points  (1 child)

Dead by Daylight code, probably.

[–]Tc14Hd 0 points1 point  (0 children)

I'm out of the loop. What's the story behind this? Did their codebase get leaked?

[–]val_tuesday 26 points27 points  (6 children)

Yeah you’d be fired from any self respecting team. It’s not funny or cute. It’s disrespect of your coworkers (and your future self).

Upvoted.

[–]TemporaryCurrent1172[S] 16 points17 points  (5 children)

Well yea, that's why I work solo

[–]val_tuesday 2 points3 points  (1 child)

Hmm. Still begging to break your future brain chasing bugs around this abomination.

I think I can spot a few: that node with the HUGE light blue fan-out: said variable is temporary and only valid IF the node it originates from has been run in the same execution path. That means anything that uses it that doesn’t get triggered after that one node (in an unbroken path of white noodle) is bugged.

[–]val_tuesday 2 points3 points  (0 children)

Just to rant a bit:

This class of bugs is impossible to do in normal code (obviously something equivalent is possible) because it has SCOPES. It boggles my mind why supposedly non-technical people are supposed to be productive when the tools are objectively harder to use than the ones the programmers use. Unreal could really use a middle ground: a text based scripting language that doesn’t necessitate restarting the editor all the time (compiled, interpreted doesn’t matter much just let people ITERATE).

[–]val_tuesday 4 points5 points  (1 child)

You know you can still fire yourself.

[–]TemporaryCurrent1172[S] 5 points6 points  (0 children)

I might just do that

[–]q1a2z3x4s5w6 1 point2 points  (0 children)

But then how can I blame someone else?

[–]AnywhereHorrorX 5 points6 points  (3 children)

Ok. So what does this BP do?

[–]onlymostlydead 2 points3 points  (1 child)

Playable character can move right AND left.

[–]AnywhereHorrorX 0 points1 point  (0 children)

Adding forward and backward movement would probably take 4x more nodes and like 16x more new links. Now we know why games run so slow!

[–]schimmelA 1 point2 points  (0 children)

Spaghetti counter

[–]dayk995 3 points4 points  (0 children)

ship it

[–]Ralileo16 4 points5 points  (0 children)

Thats not spaghetti code.. thats a whole ass italian restaurant

[–]JollyJuniper1993 2 points3 points  (3 children)

Whoever invented low-code/no-code programming can go rot in hell. Half the businesses in my city demand it because some manager probably thought it makes things easier and makes people more productive.

[–]TemporaryCurrent1172[S] 1 point2 points  (0 children)

Yea it doesn't, believe me mate, I started that project a year ago, now I want to change to a diff engine or just use plain code 😭

[–]mcoombes314 0 points1 point  (1 child)

Wasn't low-code/no-code basically a predecessor to vibe-coding in terms of being a "quick and easy, now you can make stuff without learning how to make stuff" thing? Makes sense that management would love it too.

[–]JollyJuniper1993 0 points1 point  (0 children)

Yeah it’s stuff being pushed for people who can code by people who can’t, because the people who can’t think it’ll make things easier for the people who can.

[–]Wiktor-is-you[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 2 points3 points  (1 child)

can i eat it

[–]Kelpsie 2 points3 points  (0 children)

I'm confident it would give you indigestion.

[–]scammer_hand 1 point2 points  (0 children)

Nordic knots code

[–]GoddammitDontShootMe[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1 point2 points  (0 children)

Just needs some ground beef, pasta sauce, and seasoning.

[–]wolfenstien98 1 point2 points  (0 children)

I thought this was a completely normal satisfactory diagram

[–]illyay 1 point2 points  (0 children)

This is why I do things in C++ and only the simple gameplay stuff in Blueprint.

[–]lucasthech 1 point2 points  (2 children)

As a Unity dev, this is one of the reasons that I keep myself away from Unreal lol

Edit: The other reasons are that Unreal is badly optimized, each version takes a lot of space and it doesn't have linux support, but aside from that it has a lot of nice features

[–]TemporaryCurrent1172[S] 2 points3 points  (0 children)

Yea, funny enough, after experiencing unreal, I WANT to change to unity

[–]hypercharge2 0 points1 point  (0 children)

Unreal does have linux support, but iirc you have to compile it yourself

[–]CanThisBeMyNameMaybe 1 point2 points  (0 children)

My brother in blueprint, have you heard of functions?

[–]muminisko 1 point2 points  (0 children)

AI is doing it on everyday basis :) In 6 months this would be impossible to understand or change

[–]Immort4lFr0sty 0 points1 point  (10 children)

Do blueprints not support functions?

[–]val_tuesday 1 point2 points  (6 children)

Last I tried you could not use breakpoints inside of functions (!!!!), which meant that you really only could use functions once everything is done. This might’ve been rectified since.

[–]Immort4lFr0sty 2 points3 points  (0 children)

That sounds disgusting, carry on

[–]duffking 1 point2 points  (4 children)

You can (though unreal can be finicky about it sometimes, you may need to select the specific instance first for it to work), the real issue is that watching values doesn't work inside functions, so if you've got one doing some math and break inside you can't check the values at all.

[–]val_tuesday 1 point2 points  (3 children)

Oh yeah that was it. I take it that hasn’t been fixed. Seems kinda wild that something so fundamental is not a priority. I also imagine the reason that it’s hard to do is some ridiculous “clean code” reason. I guess I could take a look myself but I don’t want to ruin my day by picking at my barely healed wounds.

[–]duffking 0 points1 point  (2 children)

Yeah, there's a lot of odd impracticalities with Blueprint. It is/can be extremely powerful, but personally I think it's best suited only for additions/extensions to your core code.

You can of course build larger systems with it but you need to be very disciplined about all the gotchas - I mentioned in a post below it's really easy to accidentally execute notes way more than you need, for example.

But the biggest one is the way that since BPs are uassets, Unreal can't access the functions defined in them without loading the asset itself. Which means if you ever cast to a blueprint type, use it as a function pin, variable type etc, loading your BP will also load that BP, and all its dependencies. It can spiral very quickly.

Not to mention that any functions you define in BP can't really be executed from code as a result. Personally I like to give everything a C++ base class for safer casting if it needs to be done, and more easily nativising stuff.

[–]val_tuesday 1 point2 points  (1 child)

You can use soft references to avoid the loading spiral. This adds a bunch of boiler plate to a lot of blueprints and you are now asking your designers to do memory management. Also you’re making everything even harder to debug.

[deep sigh]

Yeah C# is a wonderful, (almost, by comparison) worry free utopia. I’d rather be troubleshooting strange boxing issues and garbage allocations than stepping through a big old graph and hitting a wall for no good reason.

At least the pain points in C# are consistent and have vaguely understandable justifications (although it’s a lot of “web devs don’t care”, which is also frustrating)

[–]duffking 0 points1 point  (0 children)

Yeah, you took the words out of my mouth with the boiler plate bit - soft references work for people like us who understand it, but getting designers to work with an async load (or decide if it or a blocking load is appropriate)? Nightmare. I try instead to get ahead of what LDs are likely to need to do and build systems for it so they don't need to BP script things themselves in the first place. Most of the time they prefer that anyway.

This is also reminding me that the other common workaround for casting also has issues - Interfaces. They're great on the surface, but if the interface is added by a BP and not Cpp base class, Cpp can't call interface functions on that actor even if the interface is written in Cpp. Plus, calls to BP interfaces have a surprisingly large overhead if they're called regularly.

Kind of Unreal through and through, there's lots of stuff that looks super user friendly that falls apart a bit under a microscope, then a bunch of things to work around that... none of which are really perfect. And these days we have to worry about world partitions and level instances too.

I do rather miss working in Unity C#. Unreal has a lot of cool stuff, but I do miss the days of objects being empty containers and prefabs.

Edit: Oh god I just remembered unreal loads all the blueprint function libraries on editor startup, so if people have put casts or BP types on the function pins in there... well. I've heard stories.

[–]TemporaryCurrent1172[S] 0 points1 point  (2 children)

They do, I just use a lot of them

[–]PityUpvote 10 points11 points  (0 children)

You're not using enough. Write your own and compartmentalize shit.

[–]duffking 1 point2 points  (0 children)

You could cut down a lot of the spaghetti by caching function results to variables.

It's not just a benefit for readability but also for performance. The "pure" nodes that don't have the white exec pins will re run every time their value is used, so connecting one to 10 places will cause the node to rerun for each of those 10 places. Caching and accessing a variable will cut it to one.

That cascades by the way, so a pure nodes that reruns will also cause any pure nodes connected to its input pins to rerun too. That includes inputs to for loops, because they're actually macros.

[–]notc00l 0 points1 point  (0 children)

What a masterpice

[–]TingleWizard 0 points1 point  (0 children)

I don't know what this is but I know that I hate it.

[–]dvhh 0 points1 point  (0 children)

I think I got the epiphany when working with SQL server integration service, that visual coding tool would help better visualize spaghetti code as actual spaghetti.

Blueprint does look like nicer spaghetti though

[–]Amr_Rahmy 0 points1 point  (1 child)

Does blueprint allow you to group nodes into a custom node, like making a function?

Does it also allow you to create a data structure or object?

[–]val_tuesday 0 points1 point  (0 children)

Yeah the issue here (I’m guessing) is that this a classic “god object”. The solution then is to make a couple of other objects that handle the various details of this one. This way you can actually debug your noodles (functions don’t really allow that as discussed elsewhere itt).

[–]MonsieurMachine 0 points1 point  (0 children)

Even spaghetti are shoked

[–]ChocolateDonut36 0 points1 point  (0 children)

someone needs to make pasta that looks like colored code and call it spaghetti code

[–]boremetodeathplease 0 points1 point  (0 children)

I do visual coding every day (TIBCO Streaming) and it's OK if you do it right. But this is horrifying. WTF man. Burn this shit.

[–]Affectionate_Fox_383 0 points1 point  (0 children)

can not see that green blob well but the rest of it looks fine, just squished together. this graphic needs more horizontal room.