Hacker News new | past | comments | ask | show | jobs | submit login

With the advances done in C++11, the answer is pretty much yes, at least until another language with native compilation takes its place.

Even Microsoft has started to deploy native code for .NET Windows Phone 8 applications with the MDIL format.

A C++ replacement in the game / graphics area needs to provide the same mix of hardware control and abstractions that C++ provides.

Currently I only see Ada as possible contender, but it is considered too verbose by many developers.

D and Rust still need to earn the hearts of the games community and become more stable.




So Managed languages with a VM are bad for Game-Engines??


Garbage collection is...


Garbage collection is not the main problem, for that you just need to take care not to stress the garbage collector.

The main issues are the pauses caused by the JIT and lack of memory layout control, which is very important to take advantage of how caches work.

Additionally current JITs, except for Mono, don't explore the set of available vector instructions.


D is garbage collected. So is C#.


Last time I looked, you could turn the D garbage collector off (both completely and temporarily).

While Unity uses C#, it still seems to use C/C++ components for graphics and physics and such (going by the libraries it uses internally, anyway) and allows you to call native code if you wish.


> Last time I looked, you could turn the D garbage collector off (both completely and temporarily).

You can, but it's hard to ensure a strict no-allocation policy afterwards (someone did it recently).

A moderate amount of allocations each frame is usually ok, and this routinely happens in C++ engines too. In my opinion, it's absolutely possible to make a game with D and GC enabled. It's a bit like not making too much drawcalls in a frame.

Eg. for this game I only made one struct pool and that was it: http://www.gamesfrommars.fr/wormhol/


Sure, you can do pool allocations in, eg, Java too.


C# sis tied to Microsoft platforms. It's a no-go for anything else.

Maybe Rust dethrones C++ one day.


Mono? (Which is used in Unity, by the way)


The main problem with Mono is that not the full .NET API is supported by it.


> The main problem with Mono is that not the full .NET API is supported by it.

http://www.mono-project.com/Compatibility

I don't see how any of the non-implemented features are going to be blockers for a game engine.


The very small list of unsupported APIs are extraneous and unnecessary in the context of cross-platform code. So, what APIs are you referring to, specifically?

http://www.mono-project.com/Compatibility

The big ones are: WCF, WPF, WWF... Guess what the first W in all of those acronyms stand for? Windows.

EDIT: It's right there at the top of the page - "Everything in .NET 4.0 except WPF, WWF, and with limited WCF." - I don't see a problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: