Live data from Hacker News

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

news.ycombinator.com

101–110 of 155 posts

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

#101

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…

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

#102
post #72

If you want a hands on answer OP, download Blender and follow the donut tutorial on YouTube. As a software engineer with 10+ years of experience, the geometry nodes in Blender just make sense[1]. The comparison here is your are creating a 3D object from scratch, just like a game designer would create a 3D scene from scratch. [1] It's a form of visual programming.

Blender nodes are pretty much the same as Unreal Blueprint. The differences are smalll enough to not matter for the purposes of this discussion.

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

#103
post #81
post #7

On the larger game teams I've worked on, most people using blueprints and schematics aren't the programmers but the content creators. The programmers are providing said blueprint elements/building blocks as well as extending (or modifying) the engine with other logic that content creators don't need access to via their visual tools. For example: a level designer might want a specific type of entity in their level (le…

This explains why there's a simplified scripting layer but not why it's a graph based programming language. Unity has an example of configurable game objects without graphs but still the momentum is towards graph based systems in many places.

Graphs show logic flow. It's as simple as that.

Monobehaviours in Unity alone can't show logic, they contain them, they're just components that don't describe an inherent execution order among themselves.

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

#104
post #79

If you can use a Domain Specific Language (DSL) for a task, or in this case a Domain Specific Modelling Language (DSML), why wouldn't you use one? It's no different from using SQL for database access. Basically, someone has to do a ton of upfront work designing a domain specific language for a task, in this case game scripting then it's easier for people to do the game scripting using the domain specific language tha…

Well sure, but the question is why are graphical languages the DSL of choice?

I think they make the restrictions of pure functional programming more intuitive to deal with. Working in blueprint is basically like working in Haskell, but anyone who spends 5 minutes learning the ropes in blueprint can immediately be productive. Contrast to Haskell where programmers need to almost have their brains restructured to work within the confinements of pure programming and be productive.

So I believe the plan is to trick the content creators and less strong programmers into using a purely functional programming language so that they produce less bugs.

Anyway that's my take on it, I only made a few demo games in blueprint and really enjoyed it, I haven't used it in anger so to say so someone who's actually in the industry might speak better to it's actual merit.

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

#105
> Why is visual programming so popular for game programming compared to other domains?

Visual programming / executable diagrams are (usually, though it seems from mostly just-outside-the-market to ebb-and-flow over time) popular in business integration as well.

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

#106
post #96
post #6

With the availability of game engines, gameplay programming is actually very high-level. Most of the logic is handling some input or some collision or updating some position or timer every frame. The more complex parts of a game (collisions, physics simulation, rendering, asset management, networking, etc.) is handled by the game engine itself, so the games programmer usually only need to interface with the high-leve…

Game Engines Suck. There, I've said it. Most 'games' are in fact interactive movies, with very little game in them. That's what Game Engines enable. I'm vote we stop calling them Game Engines and instead call them Interactive Movie Engines. > The more complex parts of a game (collisions, physics simulation, rendering, asset management, networking, etc.) is handled by the game engine itself, This is and always was a B…

> There, I've said it. Most 'games' are in fact interactive movies, with very little game in them. That's what Game Engines enable.

While I disagree with your argument about game engines being bad for games, you bring up an interesting point. Game engines are becoming cinematic movie engines.

Right now, they're a bit sub-standard. They shouldn't be built for consumer hardware at all, but rather live in the cloud where they have access to a lot of GPU compute for rendering.

The thing they get right is the reduction in film production complexity. Less going to set, less setting up lighting, cameras, etc. Easy tweaking in post, and an almost complete inversion of the production pipeline where directors, actors, and animators can work in lock-step with one another in fast iteration.

Unreal Engine is being stretched to do film things, but it's ultimately a local optimum. We're going to see a lot of new tools emerge in this space. (I'm building one!)

In the near future, films shot on cinema cameras and glass will be in the minority of visual media produced. It's just too time consuming. It'll become an artisanal pastime that directors like Wes Anderson remain attracted to.

The really interesting thing will be what happens to studios like Disney and Netflix that bank on in-house content and IP. Once media is no longer expensive and kids at home are making Star Wars of their own, the linear content moat is gone. Franchises and major IP will probably move to difficult-to-produce (for now) mediums, such as games, since films will turn into something more closely resembling novels - a huge basket of works, a wide distribution of quality, and a very long tail of interests that are catered to.

The next decade is going to be a wild ride.

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

#107
post #76

What seems to help is that Epic came up with a modular blueprint system. Blender used to have a game engine, with blocks connected via wires, but the entire game was in one giant diagram. Epic blueprints tend to be of modest size.

Nothing new in that regard, I was doing modular digital circuit design already in Windows 3.1 based simulation software.

The problem are those people that write functions that take endless PgDn to go through, well in visual languages that kind of mess is quite obvious.

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

#108

Because games are visual. It is a shame that so much of programming is still through text files. Web programming for example should be completely done visually.

Here for you, https://www.outsystems.com

The biggest issue is that many devs don't want to pay for their tools, like in any other profession.

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

#109
post #53

My speculation is that because game industry know to design better UI patterns, they simply made better visual programming languages.

This makes sense, it’s like if all web development were done in the canvas or webgl and there wasn’t CSS then front end engineers would have built more tooling.

They did, but then the FOSS movement took them away without proper replacements.

For those that pay, or have their employers pay, for their tooling,

https://www.outsystems.com

https://webflow.com

https://playcanvas.com

https://www.adobe.com/products/animate.html

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

#110
post #75
post #61

Earlier quoted context omitted.

Also in game-engine adjacent spaces blender, and Houdini have similar visual languages.

Oh nice, I didn't realize Blender had a visual scripting system. I knew that they had a Python API like Maya, but the visual stuff is a nice feature to have for art teams. I keep telling myself I'm going to force myself to learn Blender one day. It seems to have really matured over the years. From a quick glance it reminds me of Unreal Niagara, or Unity Visual Effect Graph. Pretty cool.

It has a couple, one for writing shaders and another for manipulating geometry.

You can even combine them - outputting values from the geometry nodes to be used by the shaders.

Post reply on HN