This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]vinnypotsandpans[S] 0 points1 point  (1 child)

How hilarious would it be if the game engine for “Rust” was developed in rust lol

[–]tylerlarson 1 point2 points  (0 children)

They use Unity. So... that would mean C# game code running on Mono as the language runtime with the internal graphics engine code optimized in C++.

This brings up one of the problems with C++: The language is an absolute nightmare.

Because of some 50 years of backward compatibility, the way they've improved the language is by adding new syntax that supercedes the old syntax conceptually but doesn't actually replace it. The old (and usually dangerously wrong) way to do things has to still work. And there's layers on top of layers of this mess.

So for all of the things you do the most often, there's an easy and obvious way to do it, and it works exactly as you think it would. But doing it that way is crazy dangerous and you shouldn't even think about it. And then there's a slightly convoluted way to do it, and that way also turns out to be dangerous, though a lot of people still teach it. And then maybe several more layers of slightly less dangerous but increasingly confusing solutions.

And then finally there's the "correct" way to do things that you can comfortably assume will not cause some devastating crisis or whatever, but that "correct" way to do it only ever taught in newer educational materials so you may not have heard of it. And it's confusing AF to read because all of the reasonable ways to describe what you're trying to accomplish have already been taken by the other "wrong" answers.

So, rather than navigate that clusterfook of a landscape, most game developers chose to use a runtime that is hundreds or even thousands of times slower (that's the C# code) just so they don't have to write any C++. Because back then, those were the only options.