|
楼主 |
发表于 2020-11-30 19:13
|
显示全部楼层
对于靠谱的程序员来说,C# 或 Java 这样的语言其实已经很好用了,并不奢求图形节点编程,而且一旦私有的图形节点编程的语言功能不如 C# 或 Java,就会觉得不爽。
=================
使用适合的 paradigm 来做事情。
图形节点方式适用于粒子系统、材质(即便材质都是高级 shading language 那种更适合,如 Unity 那种自定义的 effect framework + GLSL/HLSL/Cg,很容易映射成平台 shader)、图像/视频合成、不要太复杂的 gameplay/算法等。
Gamplay 编程系统要既 powerful 又 productive,C++ powerful 但不够 productive,图形节点编程 productive 但一般不够 powerful。
缺点:
1. 编译器把代码(例如一段四则运算表达式)转换成 abstract syntax tree。图形节点方式编程等于是自己人肉连 AST。
2. 向量分解/合并尤其蛋疼。
3. 一屏可以显示的代码量远超节点量。
4. 有时候为了简化 graph,不得不增加个 script 节点,在里边写比较多的脚本。
5. 代码是一行行的线性结构。Graph 是个二维结构,navigation 比较容易晕。当然,图的执行可以是水平的线性结构,但水平方向容易很长,鼠标滚轮完全排不上用场。
6. 不容易 merge 或 diff。
7. 自定义的图形化编程,其语言功能不太会赶得上通用的标准的化代码语言。
8. 库支持不太会如标准化的代码语言。
Visual programming and why it sucks
flowcharts are a very poor abstraction of software structure
work fine for simple, trivial programs
电路是天生的图表示,但工程师还是认为用硬件描述语言更易理解:
HDL simulation enabled engineers to work at a higher level of abstraction than simulation at the schematic level, and thus increased design capacity from hundreds of transistors to thousands.
The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC) (circuit diagrams were previously used to specify the configuration, as they were for ASICs, but this is increasingly rare).
===========================
https://docs.unrealengine.com/latest/INT/Engine/Blueprints/TechnicalGuide/Guidelines/index.html
"A good practice to follow would be to use Blueprints extensively, and then push things into C++ as they reach a complexity where that would enable a more concise expression of the functionality (or it becomes too complex for a non-programmer), or speed of execution dictates a move to C++."(这段不敢苟同)
"Operating on large sets of data, doing string manipulation, complex math over large data sets, etc. are all very complex, and aren't easy to follow in a visual system. Those things are better kept in C++ than in Blueprints, just because they're easier to look at and figure out what's going on."
"If you have many more artists than programmers, you'll probably have significantly more Blueprints than C++ code. In contrast, if you have a lot of programmers, they're probably keen to keep things in C++." |
|