4 ms·
I wonder if with the new ref improvements in C# 7.0, there will be more adoption of it for game development (even amongst these sort of C++ people, who think C#
by AdeptusAquinas 10y ago
I wonder if with the new ref improvements in C# 7.0, there will be more adoption of it for game development (even amongst these sort of C++ people, who think C# is 'tacked on' to VS, rather than it being the other way round).
- jackmott 10y agoI don't see a huge win there. Since RyuJIT C# has been a reasonable option for game dev. Value types are already there to help avoid GC and get fast array iteration over small things. There is some SIMD support. What is there, is pretty good. But not everything is exposed. That would be nice. Better array bounds elision would be good, and that may be coming, I know they are looking into it. It does it but only in the most obvious cases.
- douche 10y agoSome kind of official graphics library support would really be needed. XNA is dead, and has been for years. Managed DirectX is even more dead. The community-supported options are Monogame (an open-source version of XNA), SlimDX (a kind-of-no-longer-supported wrapper around DirectX), and SharpDX (a more-actively-developed DirectX wrapper). I think there are also some options for OpenGL wrappers on .NET, but I'm not familiar with them and they don't seem to be that popular.
- MaulingMonkey 10y agoThe main C# killers for gamedev are: - Portability (to consoles - you basically need to port Mono yourself, as NDAs prevent upstream from receiving all the necessary changes...) - Legacy (lots of C++ libraries they want to use - you can write C stubs to PInvoke, but this can be awkward...) - GC collections (with little control over the timing of latency spikes other than to avoid all allocation during gameplay - again possible, but awkward.) Many of these are more ".NET Runtime" problems than C# problems.
- sssilver 10y agoGame development, as far as cutting-edge AAA-looking games, will never adopt a language with automatic memory management. I guess Rust is the only language that has a fair shot at that right now.
- fpoling 10y agoSwift uses reference counting and does not suffer from latency spikes. So it can also be used.
- sssilver 10y agoReference counting is still a form of automatic memory management and has performance implications. Remember, when dealing with data volumes along with performance constraints of a typical modern video game, cache misses are CRITICAL.