The JIm Sterling thread have gotten me todo some searching on the net for what people think of Unity, and alot of people seems to discard it because of the CLR versus other engines that uses native code. I even found a thread at r/gamedev that calims he uses native plugins in replace of C# because he got 10x faster speeds.
These guys cant be real gamedevs I hope? I mean, dont they know that the CLR is stricly used for game logic only? Its used to control the core mechanics of the game, everything else is handled by Unity which runs in native code. And that 10x claim, hell no you can get standard game logic to run 10x time fasters than CLR code, maybe if you do alot of byte shifts and low level operations then maybe native code can be 10x faster, but just maybe.
It is possible to make a game with minimum programming knowledge nowadays. So…
Having said that the fact that unity does not provide proper C++ bindings hurts unity.
Major problems are:
C++/C# interop has significant overhead.
Garbage generation. C# generates ton of garbage and provides very few mechanisms to deal with it. Garbage also leads to non-deterministic lifetimes.
C# code generated unity is actually slower than what you’d get in C++. It doesn’t matter when you deal with logic, but if you, say, decide to write a custom collision detection in C#, or a custom cloth sim, you’ll be very likely to hit the performance problems. Basiclly, you can easily get away very frequent use of standard containers, but in C# (within unity), you can hit problems there.
You shouldn’t do cloth simulation and the like in a CLR language, that’s my point. You use it for the domain code, the code that makes out your game. For example ours take 0.5 ms
It wouldn’t matter if it takes 0.25 on a native language. The value from having a managed language is far greater. Besides set pass calls and batching is a far greater CPU bottleneck
The guy that talked about 10x faster talked about replacing script logic with native plugin, no way that will gain 10 times speed, maybe if your gamelogic includes decoding h264 video content or other lower lever data shifting.
It is impossible say anything about it without additional data. Maybe he has hundred thousands entites in the scene.
Either way, I wouldn’t dismiss this kind of stuff without actually seeing what this dude is doing. In the end it doesn’t really matter if he is telling the truth or not.
Also, the important thing:
What, exactly, is the goal of this thread?
Basically…
“Can those people be real gamedevs?” Yes, they can be real gamedevs
“Can this guy be telling the truth?” Yes, this dude could be telling the truth.
“But CLR isn’t meant to be used for…” Proponents of .NET/IL assemblies etc usually argue that “it can be as fast as native code!” (because of JIT compilation/etc). So whoever tried to use it for a situation where native code works well, got unimpressive results and complained about them… those people actually have a valid reason to complain.
I have worked 17 years as a professional dev, 10 years before that as a hobbiest. 99% of that time I have used virtual machine oriented languages or managed code or whatever you wanna call it. And during those 27 years I have seen so much hate coming from native code folks.
I use the right tools for the right task, heck, I have used Cuda for BI use cases to save a few hours of computing time each day. That made sense in that big data crunching scenario, it would mean less sene to use it to get data from viewmodel store to convert to JSON and send to the view. This is from my enterprise dayjob. Now I see the same native code fanboys in the gaming world. Makes me sad
Random link out of nowhere with no quote looks like an attempt to promote some nonsense blog.
Checked it out. The article is a waste of time.
This is a beginner level nonsense any decent programmer is supposed to know by default.
“10x faster” is clickbait, and “your scripts” is lies because unity does not provide C++ side monobehavior/gameobject/component bindings (I highly doubt I overlooked them)
Dude in this amount of time you’re supposed to have figured out that people say all kind of things, but listening to those things is often a waste of time. The world is not gonna change, and there will always be “programmers” that feel fanatical (for an incomprehensible reason) about their favorite tech. Those people can be ignored.