Re:Yuzu: Nintendo Switch Emulator
by remram on Saturday January 22, 2022 @11:27PM
(#30043629)
Unity is the most popular engine for video games right now, and uses C#.
[ Parent
| on HN ]
Please dont confuse gameplay code with the game engine itself. Unity runtime was always written in C++ even though for games and editor they use C#.
It doesn't. It's a C++ engine with C# scripting (and if you remember, used to also have UnityScript aka. JS scripting).
Unity uses C# for a certain layer but the engine itself isn't C#. They also do some work for ammortized multi frame GC.
That said, there's tons of games written in less than optimal languages for major portions of the game, like Naughty Dog games in the PS1/PS2 era used a lisp based language for a lot of things
Re:Yuzu: Nintendo Switch Emulator
by invokestatic on Saturday January 22, 2022 @11:45PM
(#30043708)
Uses C# for its scripting API, but crucially the engine itself is written in C++.
Apart from what others have pointed out about Unity's engine code being C++ it also comes with support for IL2CPP which compiles the code to cpp which can be optimised.
We've used this on all Unity projects I've been part of and it really makes a difference in performance.