r/ProgrammerHumor • • Jan 28 '23

Meme C++

Post image
53.9k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

27

u/[deleted] Jan 28 '23

Unity is strictly C# and an outdated UnityScript implementation. Unreal, CryEngine, and others use C++ for scripting. Not too long ago C# scripting support was added to CryEngine, have yet to try it though and probably never will.

4

u/gitgudtyler Jan 28 '23

Does Unity still ship with UnityScript? I was pretty sure it was dropped out of the engine entirely, and was eventually replaced with something similar to Unreal’s Blueprint system.

2

u/[deleted] Jan 28 '23 edited Jan 28 '23

I believe so yes. They've done some work to "hide it" before removing it entirely as stated in one of Unity Technologies blogs. I haven't used Unity in quite a while though since I developed my own engine so it very well might be entirely removed now.

The blueprint system is just visual scripting which is entirely different. For example, the Blender Game Engine offered visual scripting called "logic nodes" for those not well versed in Python. Kind of some old stuff to be honest but can be pretty useful for level designers wanting to create events. Unity does have it's own visual scripting solution now, I believe it used to be an asset and Unity Technologies bought it? Memory is extremely hazy. All visual scripting does is generate code under the hood and with Unity being dominantly C# I would imagine it is C# or bytecode being emitted.

2

u/gitgudtyler Jan 28 '23

I did a little bit of digging. Looks like the UnityScript compiler was removed in the 2018.3 update, though I only found any mention of it on the upgrade guide for that release.

I would still count visual scripting as a “supported language” personally. It is just a different means of input rather that broadly revolves around the same set of concepts as more traditional languages. Probably too clunky for any meaningful complexity, but perfectly serviceable for glueing existing systems and functionality together. Does that make visual scripting the Perl of game development?

3

u/[deleted] Jan 28 '23

I did a little bit of digging. Looks like the UnityScript compiler was removed in the 2018.3 update, though I only found any mention of it on the upgrade guide for that release.

Nice!

I would still count visual scripting as a “supported language” personally. It is just a different means of input rather that broadly revolves around the same set of concepts as more traditional languages.

Visual scripting is a system over a language, though I'm sure people won't complain if the labels are used interchangeably.

Probably too clunky for any meaningful complexity, but perfectly serviceable for glueing existing systems and functionality together. Does that make visual scripting the Perl of game development?

It has its uses, but most tend to abuse it because they don't know its actual intended purpose. Complicated logic, especially if data or performance oriented, should not be implemented with visual scripting. You do not have control over the code being generated, and important functionality certainly doesn't exist either. Visual scripting is mainly for those who are not experienced with programming/scripting but want to create small events in the game world, level designers being an excellent example. Beginners like to use it for simple tasks which is great to get a better understanding of how logic works, but it can very easily be abused by using it as a crutch and early versions of PUBG suffered from such mistakes IIRC.

3

u/gitgudtyler Jan 28 '23

When you get right down to it, everything boils down to layers over machine code. I think it is more useful to define languages by their ability to express behaviors than by implementation details. Visual scripting systems like Blueprint are Turing complete, so I view them as full languages in their own right even if they are implemented by compiling down to another language or using another language’s runtime. Though I’m in full agreement regarding the misuse of visual scripting as a replacement for more robust languages.