[OT] Unity's HPC#

Nick Sabalausky (Abscissa) SeeWebsiteToContactMe at semitwist.com
Wed Feb 27 19:13:11 UTC 2019


In the vein of keeping our eyes open to the world around us, I found 
this article fascinating:

https://blogs.unity3d.com/2019/02/26/on-dots-c-c/

Being a high-performance game engine, Unity3D is right smack in the 
middle of D's strengths and potential.

Traditionally, Unity's core engine is written in C++ (just like pretty 
much every other high-performance game engine), whereas the game code is 
written in C# (which is first compiled down to CLIR and then, depending 
on the target platform, either run directly on Mono or further compiled 
down to C++/native.)

They have the usual group of complaints about C++ (long compilation, 
headers, and concurrency difficulties like races, sharing etc). And they 
also add another C++ gripe we don't hear about quite as often: Lack of 
guarantees and control over the generated code. (VERY important for game 
engine developers, as I'm sure Manu can attest.)

So they have a rather interesting solution: They're switching from C++ 
to a subset of C#, combined with some custom libs and IL-based tooling. 
Sounds slightly odd, but they make a very convincing case for it.

I think it's very much in D's best interest to be aware of these 
problems/solutions/rationales Unity presents here, as they would easily 
apply to other C++ users and thus a key potential audience for D.


More information about the Digitalmars-d mailing list