Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I recently learned that the MMO Minecraft is powered by Java from a recent interview on CVG.co.uk on a possible collaboration between two former and now competing colleagues. In the interview he bluntly said that the founder of Minecraft is a Java coder and he is a C or C++ coder so they are incompatible with each other. So collaborating on future projects will be difficult.

This got me thinking, If Java could do that? What does the future hold for MS very popular C# language and .Net platform as far as games or mainstream games development is concerned?

share|improve this question
2  
Yes. en.wikipedia.org/wiki/Microsoft_XNA –  Cipi Feb 1 '11 at 12:16
3  
It's all about the performances you need, Minecraft is ok in a managed language, but for high end graphics games, C or C++ or other natives languages are prefered –  Guillaume86 Feb 1 '11 at 12:18
19  
Minecraft is not really an MMO. –  DeadMG Feb 1 '11 at 13:15
3  
@Guillaume86: Jittered code can currently outperform native code, and Jits are getting better all the time. Also, managed languages produce far more robust programs. So in the end C++ loses it's performance advantage, and is significantly harder to write robust programs in (which means longer development times and more costs) –  Martin Feb 1 '11 at 15:34
4  
A JIT can beat poorly written native code, not tightly optimized and tuned inner loops. Granted even with C# you have the option of writing those sensitive segments in C/C++ if you really want. –  coderanger Feb 1 '11 at 17:50
show 7 more comments

migrated from stackoverflow.com Feb 1 '11 at 12:20

This question came from our site for professional and enthusiast programmers.

10 Answers

You should check out XNA. A platform for building games for Windows, Xbox 360 and Windows Mobile 7. All in C# and .NET.

share|improve this answer
add comment

I've been working in professional game development for over 5 years. Most of this time, I used C# almost exclusively.

C# and .NET stack in general is really great for server-side tech. I've worked on no less than 4 MMO games with server written in C#. Also, with Unity3D gaining popularity, many browser AND mobile games require C#. Don't forget XNA framework: it's not the engine of choice for AAA console titles, but there are many great games made with it, and many more currently in the making.

Overall, C# definitely has a future in game development.

share|improve this answer
add comment

As has been mentioned, Mono brings C# to multiple platforms. In that same area, you'll find Tao, a multiplatform library for Mono and .NET that allows access to Cg, DevIL, FreeGLUT, GLFW, GLU, ODE, OpenAl, OpenGL, PhysicsFS, SDL, and WGL. It's obviously not as robust when it comes to features as XNA (which provides fundamental engine components directly to the developer); but, it's plenty powerful.

So, cross platform beyond Microsoft controlled OS's and hardware is definitely possible. Just, not as many popular indie games have utilized this ability, yet.

As has also been mentioned, XNA coupled with C# allows independent developers to publish to the 360, PC, and Windows Phone 7.

Overall, C# is alive and well in game development as an engine/game language.

As a tools language, it's in use everywhere. I've built tools for EA, THQ, and now Arkadium all using C#.

share|improve this answer
add comment

Not only does C# have a future in games development, it has a present - Check out Magicka, a game recently released (and selling well) that was developed using XNA. Also take a look at the winning Dream.Build.Play entries. C# is a viable way to make games (although right now I don't believe it's the right choice for all games).

As time goes by we'll see it becoming more popular in the computer gaming industry, however I don't expect a sudden shift to C# at any point.

share|improve this answer
add comment

Java has always been a very versatile language and there's always been the ability for people to code games in it, from simple web based games (Java applets / GWT with the canvas plugin) to full 3D beasts (checkout JMonkey). So I wouldn't say the fact Java can do that sort of thing is a C# killer, because most people know Java can do that already.

C# will still remain popular though since it inevitably ties in with Windows, Windows mobile and the Xbox much better than Java (which, really, is all game developers really care about targeting so the cross platform advantage that Java has is mostly lost.) It's also got XNA which has really taken off in terms of game development.

So yes, Java is a perfectly good platform for games development if anyone wishes to go down that route, but it's certainly no C# or .NET killer.

share|improve this answer
add comment

Check out Unity 3D; C# (and JavaScript, and Boo) scripting in a high-performance 3D engine.

Add XNA to the mix and you're looking at a couple of great platforms for using C# for game development.

share|improve this answer
    
Unity also has a web player so you could play in the browser. The plugin doesn't have a huge market penetration like flash or java, but it's possible. –  Michael Coleman Feb 1 '11 at 22:39
    
yay for unity!! –  Dan the Man Aug 19 '11 at 22:30
add comment

Yes, C# has a future, with the XNA framework. Most prefer C++ because of speed, but C# is not that slow anymore...

share|improve this answer
2  
It's not slow at all. It's rarely worse than about 70% of C++ speed, and can even be faster sometimes! –  Noldorin Feb 1 '11 at 14:35
4  
CPU bound operations in C# are quite fast, it does some extra checking which vastly improves the safety of code at the cost of some minor performance hits but where it's much worse than C++ is in memory consumption and management. It's a heck of a lot easier and less leak prone in C# but the performance hits of the GC can be an absolute dog. –  justin.m.chase Feb 1 '11 at 15:18
    
Beware when targeting the Xbox360 though. The XNA runtime there lacks the ability for some of the major optimizations and prevents you from shifting performance sensitive portions to unmanaged code. –  drxzcl Jun 8 '11 at 11:46
add comment

Also - MonoDroid may be an option for C#.

share|improve this answer
add comment

What he did with Java in this instance was create an applet so that you could just log on to the site and play with a very common plugin, completely transparent to which operating system was being used. I imagine his thinking was that Java was quite transparent when used this way and it would make it easy for the quick iterative development / testing he was getting fans to do. I don't believe you can just do this with XNA because usually the tester has to have everything installed as well as the game and some general knowledge about how to compile and run this.

So I would say that there is no paradigm shift from this, it just suited what he needed at the time and obviously worked out well.

share|improve this answer
add comment

Sure, lots of programming languages have a future in games development. It is an often used false dilemma used in the computing press that there can be only one tool of type X and that everybody wants this to occur.

Nothing could be farther from the truth.

C# and Java have been used in games for a long time. C and C++ have for even longer, and still are. Lua is used as the scripting language for some incredibly popular games, with the engine written in C/C++.

So clearly, no programming language is blowing other programming languages out of the water as The Game Programming Language. In fact, we see a tendency for leading games to be composed of a high performance compiled programming language for developing the engine(s) in. and then a higher level dynamic programming language for scripting how the UI and stuff behaves.

The key at the moment is performance. If any of the programming languages/libraries used cause unpredictable/uncontrollable pauses in the application then in an action game, that will fall flat on its face. In a text-based adventure game, that might be okay however.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.