News for hackers. Stuff that matters.
Re:Ask HN: Why is visual programming so popular for game pro... by oneoff786 on Wednesday April 06, 2022 @07:30PM (#30938753)
I’m a huge fan of blueprints. A few things it does well:

* makes the engine api very discoverable, which is huge. It’s a step above intellisense and auto complete. The api is likely the reason it’s so dominate in games. It’s the bulk of game programming. Visual programming isn’t very good for coding new things from scratch.

* let’s you read code and clearly follow execution from start to finish.

* let’s you visually document concepts with collapsed nodes, and colored containers and what not. Good blueprints are literally written as long form pseudo code, with double clicks to see actual implementation.

* concepts like const functions are just conceptually clearer. Const functions have no execution pin. They (should) have no side effects. Just a calculation. The engine doesn’t enforce this I don’t think but it’s close…

What it explicitly does not do is allow you to code games without knowing how to code. Countless beginners just die on the first steps. You still need to understand object oriented design and basic coding concepts to do well.

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Wednesday April 06, 2022 @09:53PM (#30939780)
I think you are only a huge fan of blueprints because they is no alternatives in Unreal. I think if you could compare an Unreal Lua integration to Blueprints you would reach for Lua every time.

Everything you wrote is just as true for a well written text program, and untrue for badly written blueprint spaghetti!

Re:Ask HN: Why is visual programming so popular for game pro... by vvanders on Wednesday April 06, 2022 @10:30PM (#30939991)
We used to have UnrealScript and 9/10 our designers still reached for Kismet instead.

Lua is great and I'm a huge proponent of it but different tools are meant for different use cases.

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Wednesday April 06, 2022 @10:56PM (#30940130)
UnrealScript had problems, that why they dropped it 10 years ago.
Re:Ask HN: Why is visual programming so popular for game pro... by vvanders on Wednesday April 06, 2022 @11:12PM (#30940239)
Sure but as far as scripting languages go it was enough to get the job done at the time. I don't think swapping to Lua would fundamentally change that.

I say that as someone who's worked on both sides and shipped production Lua, Unreal script and C++ during that era. Visual scripting/programming tools are for your designers/artists/animators or as glue code between content that is under high iteration cycles. You can do things such as "find all references to this actor" or realtime visualization of states that just aren't as streamlined as text based languages.

The tradeoff is there's a level of complexity where text based languages are better at expressing abstractions and structure, you use them in different contexts and for different parts of a project.

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Wednesday April 06, 2022 @11:34PM (#30940355)
I'm also in the industry as an artist, level designer and gameplay programmer and have shipped games in Unreal 2, 3 and 4 and Unity, and you'll never convince me that creating boxes and wiring them up will ever be as good as text at expressing game logic and game rules.

I can understand why you might want to use it for shaders. (but not really)

And when it comes to placing volumes and marking up the scene I'll absolutely want visual gizmos.

I genuinely believe that if Epic had taken all the effort they put into blueprints, and put it into a text based programming environment, game designers would be more productive.

Re:Ask HN: Why is visual programming so popular for game pro... by vvanders on Thursday April 07, 2022 @01:06AM (#30940807)
> ... and you'll never convince me that creating boxes and wiring them up will ever be as good as text at expressing game logic and game rules.

Sure, that's pretty clear :). If you want to re-read my post above I wasn't saying that would be as good at game rules and there's a very real limitation as soon as you get away from scripted encounters and into anything more complex.

At the same time consider there may be people, teams and designers who it does work for. Very few things are in absolute and there are places where I've seen tools like this used effectively.

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Thursday April 07, 2022 @02:39AM (#30941344)
Sure.. I'm with ya.

The only reason I commented at all was because the OP listed a bunch of stuff that was good in blueprints, but I believe all those things are good in text too.

Re:Ask HN: Why is visual programming so popular for game pro... by meheleventyone on Thursday April 07, 2022 @12:35AM (#30940645)
And is kind of what they’re doing now with their Verse language.
Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Thursday April 07, 2022 @01:33AM (#30940938)
Yep, I'm looking forward to it. Have they publicly talked more about it since 2020?

update: just watched Tim Tillosons twitch stream about it. I had not seen that before.

Re:Ask HN: Why is visual programming so popular for game pro... by namrog84 on Friday April 08, 2022 @03:41PM (#30961585)
There is confirmation its coming this year(2022). They previously stated they wanted to release beta late 2021 but got delayed.

I think it'll be a massive game changer for unreal and am super excited for it.

Re:Ask HN: Why is visual programming so popular for game pro... by smcl on Thursday April 07, 2022 @07:27AM (#30943098)
It's funny, I am having a blast fiddling around with UT99 and UnrealScript (thanks in no small part to the source code that you can find if you look around on github), but at my very basic level the only real issue I've encountered is the lack of good editor support.
Re:Ask HN: Why is visual programming so popular for game pro... by beebmam on Wednesday April 06, 2022 @10:19PM (#30939937)
There certainly are alternatives in Unreal. You can implement everything (and far more) in C++ without ever needing to use blueprints.
Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Wednesday April 06, 2022 @10:50PM (#30940093)
Compiling C++ is not a alternative to a game scripting language. Unreal doesn't provide first party support for any other form of scripting.
Re:Ask HN: Why is visual programming so popular for game pro... by mejutoco on Thursday April 07, 2022 @06:39AM (#30942810)
> I think you are only a huge fan of blueprints because they is no alternatives in Unreal.

The original claim was there are no alternative to blueprints, not scripting languages.

And, of course, c++ is an alternative. Maybe not the best, but an alternative to blueprints. In the Unreal documentation [1] we can find:

- Blueprints only

- C++ and Blueprints

- C++ Only

This is why I think it is common to mix and match them.

[1] https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScrip...

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Thursday April 07, 2022 @05:31PM (#30950580)
Ok, I will revise my statement to read "You are only a huge fan of blueprints because the only alternative is c++"
Re:Ask HN: Why is visual programming so popular for game pro... by dazzawazza on Thursday April 07, 2022 @05:47AM (#30942508)
It barely provides human-time-scale compilation!
Re:Ask HN: Why is visual programming so popular for game pro... by giraffe_lady on Thursday April 07, 2022 @10:54AM (#30945217)
I have been using lua a lot recently and it fucking sucks lol. The language itself is tiny and great don't get me wrong and also you can't do anything with it. What you'll need to figure out instead is whatever jank ass mutation-heavy api someone half-accidentally exposed to it from the real stack. And of course it'll be a modified lua 5.1 or some shit, possibly with some of its most powerful and flexible features stripped out.

I haven't yet run across a lua integration that was actually reasonable to use. Every time it's a choice between "just hack in what I need to but there is no way to verify I've accounted for all the edge cases and it will be fragile as fuck" or "spend dozens of hours wrapping the exposed api in a safer and more usable OO or FP interface."

Oh also I hope you like implementing build systems virtually from scratch, and also dealing with every downside of C if you need anything more powerful than prototypical inheritance.

Six months of professional lua work has really, really drilled into me that a programming language isn't shit without its ecosystem, and it's meaningless to discuss one apart from it. I haven't used blueprints but it sounds a lot better than any lua system I've worked on.

The only really fun part is you'll often come across an undocumented function that someone obviously forgot to remove or didn't understand the implications of and you'll get DEEP system access through abusing it, or even just a straight root shell. No joke.

Re:Ask HN: Why is visual programming so popular for game pro... by jay_kyburz on Thursday April 07, 2022 @09:45PM (#30952429)
I find some parts of Lua quite ugly and weird. It _is_ weird to have a lists a dictionary be the same thing, but you have access them differently, pairs() and ipairs() etc ect.

And I think it would be scary to have a team of programmers coming on and off a Lua project doing things all subtly differently, even rolling their own OO for example. You would have to be very disciplined as a team.

Re:Ask HN: Why is visual programming so popular for game pro... by tomatowurst on Wednesday April 06, 2022 @11:16PM (#30940258)
I really don't get why this is being downvoted, you cannot rely on blueprints alone. If you've ever shipped a game ( and I've invited oneoff786 to share any titles he has released in the past) before. Blueprint simply is not a replacement for programmatic text.

Where blueprint shines is strictly limited to animation rigging (what animation to play when a character is doing what or response to user control) and visual effects (what the result would be if i mix certain elements, apply lighting, shader etc).

Outside of these two areas that are meant for content production, you won't find many studios employing professional blueprint programmers because it is far too slow and difficult to debug.

To illustrate this create a blueprint for a simple C++ loop with a dozen switch statements with conditionals inside each, that is a lot of mouse clicks, movements and typing. When you write code, you don't need to worry about how to organize nodes that is readable, there is no hand eye coordination of where to place your conditional node that will branch easily to a dozen or more wired connection.

In addition, for performance boosts and debugging, you are almost guaranteed to always use C++ and it is NOT the most user friendly experience especially for those who are not exposed to C++.

I just want to warn anybody from taking oneoff786's comment at face value without really realizing the full cost of using UE for its blueprint, you will be sorely disappointed and this is backed by up by many who have shipped games before.

Unity has visual programming, it isn't the the selling point of Unreal, and that isn't why large studios are using Unreal for. If you are an indie developer or a hobbyist interested in shipping games, Unreal will greatly delay and lead to frustrations.

I'm just warning anybody in case they think that blueprints are all that is needed to wire up a game in UE, that is NOT the case, you might be able to pull it off with purchased assets without much focus on novelty, but you could easily achieve the same far faster with Unity.

Game development is hard but its especially hard when relying on UE4's blueprint. Even more so when you are stuck with waiting for someone to reply to your forum questions and told to rely on Intellisense to figure out which API method to use because the document is out of date.

In fact I recall being told to just compile the UE engine to learn the inner workings, if I was a professional C++ developer at a game studio sure, but I'm a hobbyist shipping games on Steam, its a no go. C# is far far more accessible as many decisions are made for you as well as there are far bigger community and tutorials around Unity3d.

If you have the money and experience to use Unreal, go right ahead, you can absolutely make amazing games, but I guarantee you will end up using C++ and its 3rd party productivity tools since what's offered out of the box really is going to take ages for a shippable game compared to whats possible with Unity.

Finally consider the financial incentive of Epic, they need money from established studios that has a history of shipping games to cut them a royalty check, you can't do that by investing in hobbyists and indie game developers who are unlikely to ship a game ever!

Re:Ask HN: Why is visual programming so popular for game pro... by oneoff786 on Friday April 08, 2022 @09:26AM (#30956513)
You can absolutely ship a game with blueprints. The performance drop is relatively minor. There are some things that are impossible to do in blueprints, but many games will not need them, or can just handle that small % in c++, which is what I do. Specifically I refer to complicated rpc stuff.

> To illustrate this create a blueprint for a simple C++ loop with a dozen switch statements with conditionals inside each, that is a lot of mouse clicks, movements and typing. When you write code, you don't need to worry about how to organize nodes that is readable, there is no hand eye coordination of where to place your conditional node that will branch easily to a dozen or more wired connection.

For each node -> Switch nodes -> switch nodes.

Collapse the switch nodes so that you have only one master switch statement. Easy. And way way cleaner than code imo. And less time to code as you don’t need to manually specify each switch if it’s something nice like an enum?

[dead]
Re:Ask HN: Why is visual programming so popular for game pro... by Biganon on Thursday April 07, 2022 @05:18AM (#30942331)
Fascinating input, thank you.
Re:Ask HN: Why is visual programming so popular for game pro... by bob1029 on Thursday April 07, 2022 @06:09AM (#30942640)
Despite limitations, if you can find ways to simply tolerate these techniques, you will find that you then automatically empower others on your team.

I agree this is a shitty way to manage complexity, but at the same time it's super intuitive for lots of people. Maybe find ways to apply it conservatively and guide the non-hardcore emacs users down a path that won't drive you mad.

Re:Ask HN: Why is visual programming so popular for game pro... by oneoff786 on Friday April 08, 2022 @09:19AM (#30956455)
I would love it if they released Verse, but no, I love blueprints. The discoverability is so key for new learners. The impossibility of syntax errors is nice. It’s relaxing to code in bp.
Re:Ask HN: Why is visual programming so popular for game pro... by MisterTea on Thursday April 07, 2022 @07:59AM (#30943298)
Same with industrial control ladder logic. It literally is a language based on old ladder electrical control diagrams which were popular for industrial machinery. They were easy to follow as the logic sequence went from top to bottom. The rungs are a circuit and the vertical bars are the hot and return lines of the control power supply.

  |----||----||----()
       X1    X3    Y1
The above program is a series of two "contacts" (like a switch), the "-||-" symbol, and the output "coil" which is meant to symbolize a relay coil. Simple bit logic: if X1 and X3 are true, Y1 is set true. There are many more symbols like comparisons symbols such as -|<|- which will allow you to compare register/variable values as well as timers and other function blocks.

Fun fact I learned: Many (all?) rail signal and control blocks are written in ladder with ALL valid states of that rail block predefined in ladder. The logic is simple but the task is incredibly critical. Supposedly it is much easier to visually verify/test the program using ladder vs a written language.

Re:Ask HN: Why is visual programming so popular for game pro... by darkteflon on Wednesday April 06, 2022 @07:36PM (#30938797)
That’s a really interesting comment, thanks. It always seems like UE’s Blueprints are a victim of poorly-informed expectations. Hearing the additional context here is hugely helpful.
Re:Ask HN: Why is visual programming so popular for game pro... by oneoff786 on Friday April 08, 2022 @09:37AM (#30956621)
It’s in no small part because they are marketed as something that you don’t need to be able to code with. But there’s a big gap between no code solutions like website builders and blueprints. Blueprints involve a lot of coding familiarity.
Re:Ask HN: Why is visual programming so popular for game pro... by fxtentacle on Thursday April 07, 2022 @03:01AM (#30941495)
Let me add one more big thing: With Blueprint, the engine team can check-in binaries into Perforce and the rest of the team can use those custom binaries and their custom APIs in Blueprint without ever having to touch a compiler.

Also: Blueprints reload instantly and are easy to debug.

Re:Ask HN: Why is visual programming so popular for game pro... by drwiggly on Friday April 08, 2022 @12:52AM (#30953437)
Can you diff them?
Re:Ask HN: Why is visual programming so popular for game pro... by namrog84 on Friday April 08, 2022 @05:01PM (#30962469)
Yes. Sorta. Unreal has a blueprint diffing tool to compare against different commits.

Its a frequently overlooked feature. Itd be great to have more accessible outside the editor.

Re:Ask HN: Why is visual programming so popular for game pro... by fxtentacle on Friday April 08, 2022 @03:40AM (#30954355)
Perforce usually does check out check in precisely because artists hate diffs.
Re:Ask HN: Why is visual programming so popular for game pro... by oneoff786 on Friday April 08, 2022 @10:27AM (#30957204)
No. Which is very frustrating, because bp seem to be storeable as a json sort of thing which you can copy paste into text, but gets saved to get as a binary thing.
Re:Ask HN: Why is visual programming so popular for game pro... by picture on Wednesday April 06, 2022 @09:16PM (#30939529)
Super pedantic and unimportant nitpick: I think you mean to use "lets" instead of "let's", which is a contraction of "let us"
[dead]
Re:Ask HN: Why is visual programming so popular for game pro... by rl3 on Thursday April 07, 2022 @01:45AM (#30941015)
>Don't apply tolerance in defense of mediocrity.

Despite being a grammar perfectionist myself, I know several people who don't even bother with simple apostrophes. Yet, these same people run congitive circles around me in many areas.

I wouldn't be so quick to judge. Tolerance is a good thing. The underlying content is ultimately what matters, especially on an international public forum like HN where you typically don't even know who you're talking to or what their context is.

Re:Ask HN: Why is visual programming so popular for game pro... by thr0wawayf00 on Wednesday April 06, 2022 @11:48PM (#30940418)
> there is no excuse for such errors

You do realize that common mental conditions like ADHD cause people to commit these "syntax errors" in language all the time, right? What an ignorant, ableist, and frankly pathetic take this is.

Re:Ask HN: Why is visual programming so popular for game pro... by throwuxiytayq on Thursday April 07, 2022 @01:35AM (#30940954)
I know people with debilitating ADHD who nonetheless manage to communicate more clearly and correctly than their peers.

Since you're throwing accusations at random people online, are you sure you aren't dyslexic or lazy?

By the way, spell checkers are a thing these days. Seriously, check it out. People you write to might appreciate the absolutely microscopic amount of effort it takes to check what you're typing.

Re:Ask HN: Why is visual programming so popular for game pro... by mcv on Thursday April 07, 2022 @04:34AM (#30942070)
Spell checkers are often terrible, and are just as capable of introducing errors as fixing them, and don't always catch grammar errors like lets vs let's.

Look, I care a great deal about proper spelling and grammar, and put a lot of effort into it, but errors can still happen (I've noticed I've been making more spelling errors in recent years than I used to, which worries me). Your comment just sounds needlessly dismissive of people with dyslexia. You could also put effort into proper spelling without trying to come off as a dick (which frankly is probably worse than bad spelling).

Re:Ask HN: Why is visual programming so popular for game pro... by thr0wawayf00 on Thursday April 07, 2022 @09:56AM (#30944473)
> are you sure you aren't dyslexic or lazy?

Thank you for proving my point in one sentence, comparing those with dyslexia and those who are lazy.

> By the way, spell checkers are a thing these days.

I use spell-checkers all the time. To be honest, I think spell checkers are one reason why people complain about this in the first place because offloading the cognitive load of spelling and grammar to software inevitably means that people stop thinking in those terms and eventually lose the ability to communicate perfectly without the assistance of software. And then when that software isn't available in every input on every application, mistakes get made.

I have major problems with third-party browser plugins that read all of your browser input in order to fix your grammatical errors, so I typically don't use them in the context of HN. Since I'm writing a comment into a browser text input and not a word processor, this isn't content that I'm trying to sell or polish. It's just to communicate simply and sometimes mistakes are made. Should we always send texts in complete sentences so that our recipient fully understands the depths of our command of the language? Plus, how many times have you seen a grammar checker get it wrong? I have many times. Spoiler alert: software isn't perfect.

I would understand the argument against grammatical ticks in a context where content is paid for or traded on a professional level. When I buy a book, I expect it to be tight and free of errors. But I'm not paying to be on here, I'm here to exchange ideas, and some of the most intelligent people I've come across in my career aren't necessarily the most eloquent, polished communicators.

Re:Ask HN: Why is visual programming so popular for game pro... by xigoi on Thursday April 07, 2022 @02:22PM (#30948411)
You must have a really weird definition of “comparing”. If I ask “isn't the elephant pink or fastº, does that mean I'm comparing pink color with speed?
Re:Ask HN: Why is visual programming so popular for game pro... by huffer on Thursday April 07, 2022 @12:00AM (#30940477)
thank you