Live data from Hacker News

Ask HN: Why is visual programming so popular for game programming?

news.ycombinator.com

141–150 of 155 posts

Re: Ask HN: Why is visual programming so popular for game programming?

#141
post #85

I think its only because Unreal has one, and everybody wants to be like Unreal. I think Lua in Roblox, or the Godot's python like language, or Unity's C# is strictly better in every way. Visual Programming languages don't prevent "non programmers" from writing really weird code that makes no sense. You will find many first time programmers that like visaul programming because they created something cool in Unreal. I…

I rather have people giving me their architecture documents in UML than incomprehensible prose.

This isn't about architecture so much as implementation, though. Would you prefer to look at a sequence diagram there, or actual code?

To me, only the code is real because it can be run and is the product. UML is great for niche cases, but it doesn't represent the truth well, and is usually at least one time increment out of sync with reality.

Re: Ask HN: Why is visual programming so popular for game programming?

#142
post #21

Earlier quoted context omitted.

I love this answer. . . There is really something to be said about context. Thank you for your this!!

That answer would make only make sense if you did the programming in the 3d scene. Game Design is not visual at all, it's pure logic. "when I pull the trigger, find the thing I am pointing at, if it has armor, reduces its health by 10, otherwise reduce its health by 20" Game Art is all visual. Red is scary, green is good, sort of. They are completely separate paradigms.

I do think the because it is 3d is an oversimplification but to me it is valid. Of course design is a lot of logic, but that isn't the only place the fun lives. Most of the fun is in the visual enviroment.

Re: Ask HN: Why is visual programming so popular for game programming?

#143
How do you know it’s so popular? And popular with who?

Do you know of any developers who otherwise use text-based tools and who switch to visual programming just when they work on games?

Personally, when using visual programming UIs, I instinctively look for some kind of “edit source” function. It just seems like a waste of time to use the mouse to browse through menus and constantly reorganize the board.

My guess is that visual programming is simply more approachable and more appealing than text-based programming when you’re just starting out and you’re intimidated by the unfamiliar conventions of coding. It’s easier to learn when the the language itself looks like the teaching tools (such as flowcharts). And I bet that more people start out by writing games than any other kind of software.

Re: Ask HN: Why is visual programming so popular for game programming?

#144
post #56

Just because Unreal does it doesn’t mean it’s “popular”. I’m not familiar with any other game engine that has something like this as a first class feature. The reason blueprints exist in UE is because they needed a way to allow non-expert programmers on the team to write code that isn’t C++, but they didn’t want to use a high level scripting language like Lua. IIRC, Sweeney said (on Twitter) that in the past, it was…

FWIW, it’s heavily used in Blender as well.

Re: Ask HN: Why is visual programming so popular for game programming?

#145

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…

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!

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 programming?

#147

Earlier quoted context omitted.

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!

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…

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?

Re: Ask HN: Why is visual programming so popular for game programming?

#148

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…

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.

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 programming?

#149
Few months ago, in Ukraine run virus ad, where the cat asks to salesman, how he could buy in their shop, as he has not hands, he said "I have paws!"

And that is, when later I talk with persons from gamedev, I hear nearly same thing form this ad, "I cannot answer your question, you are cool, but I have paws".

They are not bad people, they are extremely good in their sphere, but they are not programmers at all, and in many cases, they are fear real programming, those huge texts. Visual programming is just less fear for them.

When they got stuck, they asked people like me, who are between these two worlds.

Re: Ask HN: Why is visual programming so popular for game programming?

#150

Earlier quoted context omitted.

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.

Can you diff them?

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.
Post reply on HN