4 ms·
> A significant fraction of games today is actually written in C# (Unity) and most games don't need to push the hardware at all. ??? Unity is a C++ engine, C#
by dismalaf 2y ago
> A significant fraction of games today is actually written in C# (Unity) and most games don't need to push the hardware at all.
??? Unity is a C++ engine, C# is just used for scripting...
- pjmlp 2y agoSince Burst compiler was introduced for HPC# subset, that C# is used for engine internals as well. Unity is like doing AI with PyTorch, or CuPy, yep there is a low level C++ layer for the GPGPU code, that hardly anyone touches directly. By the way, CAPCOM goes even further, they have their own .NET Core fork, and games like Devil May Cry for PlayStation 5 were made with it.
- johnnyanmac 2y ago>Since Burst compiler was introduced for HPC# subset, depends a lot on how far DOTS has come. I'm a few years out of date, but DOTS (and by extension, Burst) was more or less a very separate codepath you needed to opt into. Any game using it today needed to make the consious effort to grab the Burst package an integrate those optimizations themselves. I have heard plans to try and more or less integrate DOTS into the core engine and have gameobjects powered by entries under the hood, but I have no clue how much progress was actually made.
- pjmlp 2y agoThat is already much improved on Unity 6, and Unity 7 roadmap has more unification as plan. https://unity.com/blog/unity-6-features-announcement https://unity.com/blog/unity-6-features-announcement https://gamefromscratch.com/unity-7-development-roadmap/ https://gamefromscratch.com/unity-7-development-roadmap/
- littlestymaar 2y ago> just used for scripting... AKA writing games. Many people writing games with Unity go far beyond what anyone reasonable would call “scripting”, writing code that consume a significant part of the performance budget.
- dismalaf 2y agoNot sure why you have scripting in quotations or are implying that it's somehow bad. You're not modifying the engine code or writing a renderer from scratch when programming a game in Unity so yeah, it's scripting by every definition.
- johnnyanmac 2y agoit's a philisophical line, I suppose. at what point is "scripting" simply programming the gameplay with a tight interface? Unity can definitely blur that line at times.
- dismalaf 2y agoIs it really philosophical? Scripting means telling an already built piece of software what to do. In this case, the game engine code doesn't change, the programmer uses the existing functions and interface to tell it what to do. Even Unreal programming is mostly scripting... Yes you're writing C++ but you're only telling the engine what to do, not rewriting it (well, unless you are). It's why scripting languages are called such... The interpreter is already built and remains unchanged, and runs the code without rebuilding anything. Python doesn't suddenly become a non-scripting language just because your program reaches a certain size or scope. It's weird that someone would take offence to calling scripting scripting... Like, it's nice that things are prebuilt and make programming easier... I reach for Ruby first whenever I have a problem I need solved.
- johnnyanmac 2y agoMaybe "philosophical" is too strong a word, but I can't think of a better fitting term. By those same definitions, we can Call any kind of middleware an API "scripting". You're not changing the underlying code so much as sending calls to some other code base to do the heavy lifting. But there's definitely some like between that and what popular game engines are structured by. At the end of the day, the names are bikeshedding to me, what matters more is the output and experience of the tool more than the label applied to it. But names are communication, and communication is messy by nature.