Viability of C#/.NET as the new standard game dev platform?

前端 未结 13 1902
遇见更好的自我
遇见更好的自我 2021-01-31 04:26

For a long time now C++ has been the dominate game development language. Many AAA quality 3D engines are available to fit any budget.

My question is, with the rise of X

相关标签:
13条回答
  • 2021-01-31 05:14

    Just add to the conversation ... C#/.NET is certainly available on other non-microsoft platforms.

    • Mono.Wii
    • Tao Framework

    Between those two right there, you can target linux, mac, wii ... I'm sure if there was enough funding/interest in it, they can get Mono to run on a ps3 as well. At that point, you'd be able to write for all major game platforms using C# (albeit, probably not with XNA per-se).

    Also, to anyone wondering about performance ... lots of great things are in the works, such as Mono's new support for fast floating point math using their SIMD extensions (x86 only for now, of course): http://tirania.org/blog/archive/2008/Nov-03.html

    0 讨论(0)
  • 2021-01-31 05:18

    Well, between those too I think C#/XNA is a clear winner based on library support and really the maturity given Microsoft's experience in DirectX. That being said, I don't see C#/XNA replacing C++ as the lingua franca of serious 3D game programming (i.e. by large development houses) for a very long time, if ever.

    0 讨论(0)
  • 2021-01-31 05:19

    While some time ago XNA Professional was announced, Microsoft now seems to focus on the Express edition (though it lost the "Express" in the name), and that seems to be aimed at the hobbyist market rather than the commercial market. Among other things, this largely benefits the XBox 360 community, because they now allow hobbyist developers to develop their games for Windows and XBox 360 and then to sell their games on the XBox network, and that is a good thing.

    I'd really love to see XNA gaining momentum in the professional world, but this won't happen unless it's available for the other major gaming platforms (PS3 and Wii). The problem is not only the XNA framework / API, it's the language / framework requirement, so you can't even write the game in C# and then use XNA on Microsoft platforms and OpenGL on other platforms.

    The performance profile of XNA is also aimed at the hobbyist market rather than commercial, though the performance seems to be quite good and there are impressive demos out in the wild.

    Edit:

    If your question is actually "should I use XNA now for my project with a budget much less than a million", my answer is definitely yes. Go try it out, it's free. And it's powerful.

    0 讨论(0)
  • 2021-01-31 05:19

    I worked at a place called Newfire in the late 90's. Before funding ran dry, we had an engine that could render an immersive world that was 10,000 square km with a resolution of 10 cm. You could get a huge number of players in at once and persistently deform the landscape. This engine ran at frame rate on a P200 with a Voodoo 2 card.

    Most of the engine was written in carefully tuned C++. All the game code was written in C or C++ or Java. I also had prototype code that could define object behaviors using a push down automata that could do very decent AI. It took nearly no CPU time. The execution of game logic was dwarfed by rendering.

    At one point, I had a demo of Conway's Game of Life running in Java using our software renderer. The cells were cubes laid in a plane which appeared or disappeared and changed color as they aged more generations. While the game was running with a fixed generation rate of 4 generations per second, the 3D display was running at 20+ FPS, again on a P200 with the software renderer.

    So the answer is not definitely C++. The answer, like any problem domain, is the language that works the best within that domain. C++ works well in that domain for the rendering engine, but for the actual game logic and rules, lots of languages work well. Python is great. C# is great. Java is great.

    0 讨论(0)
  • 2021-01-31 05:20

    I am not a game developer (unless you count the Reversi game I wrote in Atari 6502 assembly language in ~1982), but I do have a lot of experience writing commercial application software in Assembly -> C -> Objective-C (anybody remember the Next Cube?) -> C++ -> Java and now C#.

    I cannot compare the game libraries but I do have some thoughts on C++ versus C#.

    IMO, the argument for C++ over C# due to performance is not as simple as some would have you believe. The software I work on is performance critical. We compete with products compiled to native code (presumably written in C / C++ / Assembly) and we win on performance to the point that our competitors even use our software over their own for certain applications.

    How can that be if C++ is faster than C#? In my experience, the answer is the fact that for any complex system, the architecture and algorithms are more important than the language (assuming that the potential performance is in the same ballpark - which it certainly is with C++ and C#). Even though I was a full time C++ developer for more years than I have used C#, I am much more productive in C# than C++. This means that I can spend more time refactoring and perfecting my architecture and algorithms than I could previously.

    Now, sometimes I have to admit that I am tempted to rewrite the core engine of my application in C++ because I know that I could get it to run faster and use less memory. So far I have resisted the urge because I believe that the drop in productivity would mean that it is only a matter of time before my C++ codebase is slower than where I would be if I had stayed with C#.

    I believe it is only a matter of time before game development transitions to C# and / or Java and / or some other language which is more productive than C++. Having used Java for several years and now C# for several years I would bet on C# - but that's just a guess.

    If I were getting started in game development today I would definitely bet on Silverlight and / or WPF. WPF is built on Direct3D. Microsoft has already announced that Silverlight 3 will support hardware assisted 3D rendering. Silverlight runs on various browsers and the Mac. With Moonlight it runs on Linux. It has been announced for some phone platforms. Thanks to the fact that Silverlight is essentially a lightweight version of WPF (it was initially introduced as "WPF/E" where the "E" means Everywhere) you can target both without a great deal of extra effort. You can have a lightweight version (free or supported by advertising) of your game using Silverlight in the browser and the real deal for serious gamers which uses WPF and runs on Windows.

    Better yet, be the person to create an excellent gaming library which allows for easy targeting of both WPF and Silverlight 3 (or Silverlight 2 if you don't need hardware assisted 3D rendering).

    While I have seen no official announcement, it is hard to believe that the next generation of XBox will not support Silverlight. Of course, I would not look for it on Sony or Nintendo gaming systems.

    0 讨论(0)
  • 2021-01-31 05:27

    I think that there is a kind of BS elitism that happens when people talk about XNA or java game frameworks or pygame or whatever. Yes, professional game houses will use C++ for a long, long time. But Atmospherian is asking about something for his own project, so I'm going to assume that he's an amateur (if he were the CEO of Epic or something I doubt he'd be posting on SO)

    Anyway, just because you couldn't code FarCry in it doesn't mean that it's a worthless framework. Major-studio level games require millions of dollars and dozens of people, but XNA/Java/pygame/etc have allowed amateurs to do some pretty awesome stuff. Amateur games and major-studio games are two different beasts and call for two different sets of tools.

    To answer your questions, Atmospherian:

    -Yes, XNA can do some pretty cool stuff and people have used it to make some cool games.

    -If you want XNA to be cross platform and work with mono, I think it's technically possible, but I wouldn't hold my breath.

    -If you want to end up with a job in the games industry, you are going to need to learn C++.

    -I think the path of least resistance to getting a working cross-platform game engine is currently in pyglet. The ease of use might trade off with speed when compared with java or C++.

    0 讨论(0)
提交回复
热议问题